diff --git a/.babelrc b/.babelrc index 75b9735f..923e8332 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,5 @@ { + "sourceMaps": true, "presets": [ [ "@babel/preset-env", @@ -11,7 +12,8 @@ ] } } - ] + ], + "@babel/preset-typescript" ], "plugins": [ "@babel/plugin-transform-destructuring", diff --git a/.eslintrc.json b/.eslintrc.json index 7c9ba410..b641785d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -21,7 +21,8 @@ "node", "promise", "standard", - "@typescript-eslint" + "@typescript-eslint", + "prettier" ], "globals": { diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..19c7bdba --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +16 \ No newline at end of file diff --git a/dist/typesense.js b/dist/typesense.js index 5ed0b882..2a17e0a2 100644 --- a/dist/typesense.js +++ b/dist/typesense.js @@ -1,11129 +1,9108 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Typesense = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i { // webpackBootstrap +/******/ var __webpack_modules__ = ({ -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; -},{}],2:[function(require,module,exports){ -function _typeof(obj) { - "@babel/helpers - typeof"; +/***/ "./src/Typesense/Alias.ts": +/*!********************************!*\ + !*** ./src/Typesense/Alias.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Alias) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Aliases__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Aliases */ "./src/Typesense/Aliases.ts"); -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; -},{}],3:[function(require,module,exports){ -module.exports = require('./lib/axios'); -},{"./lib/axios":5}],5:[function(require,module,exports){ -'use strict'; -var utils = require('./utils'); -var bind = require('./helpers/bind'); -var Axios = require('./core/Axios'); -var mergeConfig = require('./core/mergeConfig'); -var defaults = require('./defaults'); -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); - // Copy context to instance - utils.extend(instance, context); +var Alias = /*#__PURE__*/function () { + function Alias(name, apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Alias); + this.name = name; + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Alias, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.delete(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function _delete() { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "endpointPath", + value: function endpointPath() { + return "".concat(_Aliases__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.name); + } + }]); + return Alias; +}(); - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance(mergeConfig(defaultConfig, instanceConfig)); - }; - return instance; -} +/***/ }), -// Create the default instance to be exported -var axios = createInstance(defaults); +/***/ "./src/Typesense/Aliases.ts": +/*!**********************************!*\ + !*** ./src/Typesense/Aliases.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -// Expose Axios class to allow class inheritance -axios.Axios = Axios; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Aliases) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); -// Expose Cancel & CancelToken -axios.Cancel = require('./cancel/Cancel'); -axios.CancelToken = require('./cancel/CancelToken'); -axios.isCancel = require('./cancel/isCancel'); -axios.VERSION = require('./env/data').version; -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; -axios.spread = require('./helpers/spread'); -// Expose isAxiosError -axios.isAxiosError = require('./helpers/isAxiosError'); -module.exports = axios; +var RESOURCEPATH = "/aliases"; +var Aliases = /*#__PURE__*/function () { + function Aliases(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Aliases); + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Aliases, [{ + key: "upsert", + value: function () { + var _upsert = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(name, mapping) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.put(this.endpointPath(name), mapping)); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function upsert(_x, _x2) { + return _upsert.apply(this, arguments); + } + return upsert; + }() + }, { + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.get(RESOURCEPATH)); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "endpointPath", + value: function endpointPath(aliasName) { + return "".concat(Aliases.RESOURCEPATH, "/").concat(aliasName); + } + }], [{ + key: "RESOURCEPATH", + get: function get() { + return RESOURCEPATH; + } + }]); + return Aliases; +}(); + -// Allow use of default import syntax in TypeScript -module.exports.default = axios; +/***/ }), -},{"./cancel/Cancel":6,"./cancel/CancelToken":7,"./cancel/isCancel":8,"./core/Axios":9,"./core/mergeConfig":15,"./defaults":18,"./env/data":19,"./helpers/bind":20,"./helpers/isAxiosError":25,"./helpers/spread":29,"./utils":31}],4:[function(require,module,exports){ -'use strict'; +/***/ "./src/Typesense/Analytics.ts": +/*!************************************!*\ + !*** ./src/Typesense/Analytics.ts ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -var utils = require('./../utils'); -var settle = require('./../core/settle'); -var cookies = require('./../helpers/cookies'); -var buildURL = require('./../helpers/buildURL'); -var buildFullPath = require('../core/buildFullPath'); -var parseHeaders = require('./../helpers/parseHeaders'); -var isURLSameOrigin = require('./../helpers/isURLSameOrigin'); -var createError = require('../core/createError'); -var defaults = require('../defaults'); -var Cancel = require('../cancel/Cancel'); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Analytics) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); +/* harmony import */ var _AnalyticsRules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AnalyticsRules */ "./src/Typesense/AnalyticsRules.ts"); +/* harmony import */ var _AnalyticsRule__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AnalyticsRule */ "./src/Typesense/AnalyticsRule.ts"); -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - var responseType = config.responseType; - var onCanceled; - function done() { - if (config.cancelToken) { - config.cancelToken.unsubscribe(onCanceled); - } - if (config.signal) { - config.signal.removeEventListener('abort', onCanceled); - } - } - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - var request = new XMLHttpRequest(); - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); +var RESOURCEPATH = "/analytics"; +var Analytics = /*#__PURE__*/function () { + function Analytics(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Analytics); + (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__["default"])(this, "individualAnalyticsRules", {}); + this.apiCall = apiCall; + this.apiCall = apiCall; + this._analyticsRules = new _AnalyticsRules__WEBPACK_IMPORTED_MODULE_3__["default"](this.apiCall); + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Analytics, [{ + key: "rules", + value: function rules(id) { + if (id === undefined) { + return this._analyticsRules; + } else { + if (this.individualAnalyticsRules[id] === undefined) { + this.individualAnalyticsRules[id] = new _AnalyticsRule__WEBPACK_IMPORTED_MODULE_4__["default"](id, this.apiCall); + } + return this.individualAnalyticsRules[id]; + } + } + }], [{ + key: "RESOURCEPATH", + get: function get() { + return RESOURCEPATH; } + }]); + return Analytics; +}(); - var fullPath = buildFullPath(config.baseURL, config.url); - request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); - // Set the request timeout in MS - request.timeout = config.timeout; +/***/ }), - function onloadend() { - if (!request) { - return; - } - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; +/***/ "./src/Typesense/AnalyticsRule.ts": +/*!****************************************!*\ + !*** ./src/Typesense/AnalyticsRule.ts ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - settle(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AnalyticsRule) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _AnalyticsRules__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AnalyticsRules */ "./src/Typesense/AnalyticsRules.ts"); - // Clean up request - request = null; - } - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - reject(createError('Request aborted', config, 'ECONNABORTED', request)); +var AnalyticsRule = /*#__PURE__*/function () { + function AnalyticsRule(name, apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, AnalyticsRule); + this.name = name; + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(AnalyticsRule, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.delete(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function _delete() { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "endpointPath", + value: function endpointPath() { + return "".concat(_AnalyticsRules__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.name); + } + }]); + return AnalyticsRule; +}(); + - // Clean up request - request = null; - }; +/***/ }), - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); +/***/ "./src/Typesense/AnalyticsRules.ts": +/*!*****************************************!*\ + !*** ./src/Typesense/AnalyticsRules.ts ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - // Clean up request - request = null; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AnalyticsRules) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); - // Handle timeout - request.ontimeout = function handleTimeout() { - var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; - var transitional = config.transitional || defaults.transitional; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(createError( - timeoutErrorMessage, - config, - transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED', - request)); - // Clean up request - request = null; - }; - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } +var RESOURCEPATH = "/analytics/rules"; +var AnalyticsRules = /*#__PURE__*/function () { + function AnalyticsRules(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, AnalyticsRules); + this.apiCall = apiCall; + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(AnalyticsRules, [{ + key: "upsert", + value: function () { + var _upsert = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(name, params) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.put(this.endpointPath(name), params)); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function upsert(_x, _x2) { + return _upsert.apply(this, arguments); + } + return upsert; + }() + }, { + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "endpointPath", + value: function endpointPath(operation) { + return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + } + }], [{ + key: "RESOURCEPATH", + get: function get() { + return RESOURCEPATH; } + }]); + return AnalyticsRules; +}(); - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - // Add withCredentials to request if needed - if (!utils.isUndefined(config.withCredentials)) { - request.withCredentials = !!config.withCredentials; - } +/***/ }), - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = config.responseType; - } +/***/ "./src/Typesense/ApiCall.ts": +/*!**********************************!*\ + !*** ./src/Typesense/ApiCall.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ApiCall) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! axios */ "./node_modules/axios/lib/axios.js"); +/* harmony import */ var _Errors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Errors */ "./src/Typesense/Errors/index.ts"); +/* harmony import */ var _Errors_TypesenseError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Errors/TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - if (config.cancelToken || config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = function(cancel) { - if (!request) { - return; + + + + + + +var APIKEYHEADERNAME = "X-TYPESENSE-API-KEY"; +var HEALTHY = true; +var UNHEALTHY = false; +var ApiCall = /*#__PURE__*/function () { + function ApiCall(configuration) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, ApiCall); + this.configuration = configuration; + this.apiKey = this.configuration.apiKey; + this.nodes = this.configuration.nodes == null ? this.configuration.nodes : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes + this.nearestNode = this.configuration.nearestNode == null ? this.configuration.nearestNode : JSON.parse(JSON.stringify(this.configuration.nearestNode)); + this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds; + this.healthcheckIntervalSeconds = this.configuration.healthcheckIntervalSeconds; + this.numRetriesPerRequest = this.configuration.numRetries; + this.retryIntervalSeconds = this.configuration.retryIntervalSeconds; + this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam; + this.additionalUserHeaders = this.configuration.additionalHeaders; + this.logger = this.configuration.logger; + this.initializeMetadataForNodes(); + this.currentNodeIndex = -1; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(ApiCall, [{ + key: "get", + value: function () { + var _get = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee(endpoint) { + var queryParameters, + _ref, + _ref$abortSignal, + abortSignal, + _ref$responseType, + responseType, + _args = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + queryParameters = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; + _ref = _args.length > 2 && _args[2] !== undefined ? _args[2] : {}, _ref$abortSignal = _ref.abortSignal, abortSignal = _ref$abortSignal === void 0 ? null : _ref$abortSignal, _ref$responseType = _ref.responseType, responseType = _ref$responseType === void 0 ? undefined : _ref$responseType; + return _context.abrupt("return", this.performRequest("get", endpoint, { + queryParameters: queryParameters, + abortSignal: abortSignal, + responseType: responseType + })); + case 3: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function get(_x) { + return _get.apply(this, arguments); + } + return get; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee2(endpoint) { + var queryParameters, + _args2 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + queryParameters = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {}; + return _context2.abrupt("return", this.performRequest("delete", endpoint, { + queryParameters: queryParameters + })); + case 2: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function _delete(_x2) { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "post", + value: function () { + var _post = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee3(endpoint) { + var bodyParameters, + queryParameters, + additionalHeaders, + _args3 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + bodyParameters = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {}; + queryParameters = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {}; + additionalHeaders = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : {}; + return _context3.abrupt("return", this.performRequest("post", endpoint, { + queryParameters: queryParameters, + bodyParameters: bodyParameters, + additionalHeaders: additionalHeaders + })); + case 4: + case "end": + return _context3.stop(); + } + }, _callee3, this); + })); + function post(_x3) { + return _post.apply(this, arguments); + } + return post; + }() + }, { + key: "put", + value: function () { + var _put = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee4(endpoint) { + var bodyParameters, + queryParameters, + _args4 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + bodyParameters = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {}; + queryParameters = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {}; + return _context4.abrupt("return", this.performRequest("put", endpoint, { + queryParameters: queryParameters, + bodyParameters: bodyParameters + })); + case 3: + case "end": + return _context4.stop(); + } + }, _callee4, this); + })); + function put(_x4) { + return _put.apply(this, arguments); + } + return put; + }() + }, { + key: "patch", + value: function () { + var _patch = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee5(endpoint) { + var bodyParameters, + queryParameters, + _args5 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + bodyParameters = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {}; + queryParameters = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {}; + return _context5.abrupt("return", this.performRequest("patch", endpoint, { + queryParameters: queryParameters, + bodyParameters: bodyParameters + })); + case 3: + case "end": + return _context5.stop(); + } + }, _callee5, this); + })); + function patch(_x5) { + return _patch.apply(this, arguments); + } + return patch; + }() + }, { + key: "performRequest", + value: function () { + var _performRequest = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee6(requestType, endpoint, _ref2) { + var _this = this; + var _ref2$queryParameters, queryParameters, _ref2$bodyParameters, bodyParameters, _ref2$additionalHeade, additionalHeaders, _ref2$abortSignal, abortSignal, _ref2$responseType, responseType, _ref2$skipConnectionT, skipConnectionTimeout, requestNumber, lastException, _loop, _ret, numTries; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee6$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + _ref2$queryParameters = _ref2.queryParameters, queryParameters = _ref2$queryParameters === void 0 ? null : _ref2$queryParameters, _ref2$bodyParameters = _ref2.bodyParameters, bodyParameters = _ref2$bodyParameters === void 0 ? null : _ref2$bodyParameters, _ref2$additionalHeade = _ref2.additionalHeaders, additionalHeaders = _ref2$additionalHeade === void 0 ? {} : _ref2$additionalHeade, _ref2$abortSignal = _ref2.abortSignal, abortSignal = _ref2$abortSignal === void 0 ? null : _ref2$abortSignal, _ref2$responseType = _ref2.responseType, responseType = _ref2$responseType === void 0 ? undefined : _ref2$responseType, _ref2$skipConnectionT = _ref2.skipConnectionTimeout, skipConnectionTimeout = _ref2$skipConnectionT === void 0 ? false : _ref2$skipConnectionT; + this.configuration.validate(); + requestNumber = Date.now(); + this.logger.debug("Request #".concat(requestNumber, ": Performing ").concat(requestType.toUpperCase(), " request: ").concat(endpoint)); + _loop = /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _loop() { + var node, abortListener, requestOptions, cancelToken, source, response, _response$data, _response$data2, _error$response; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _loop$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + node = _this.getNextNode(requestNumber); + _this.logger.debug("Request #".concat(requestNumber, ": Attempting ").concat(requestType.toUpperCase(), " request Try #").concat(numTries, " to Node ").concat(node.index)); + if (!(abortSignal && abortSignal.aborted)) { + _context6.next = 4; + break; + } + return _context6.abrupt("return", { + v: Promise.reject(new Error("Request aborted by caller.")) + }); + case 4: + _context6.prev = 4; + requestOptions = { + method: requestType, + url: _this.uriFor(endpoint, node), + headers: Object.assign({}, _this.defaultHeaders(), additionalHeaders, _this.additionalUserHeaders), + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: responseType, + validateStatus: function validateStatus(status) { + /* Override default validateStatus, which only considers 2xx a success. + In our case, if the server returns any HTTP code, we will handle it below. + We do this to be able to raise custom errors based on response code. + */ + return status > 0; + }, + transformResponse: [function (data, headers) { + var transformedData = data; + if (headers !== undefined && typeof data === "string" && headers["content-type"] && headers["content-type"].startsWith("application/json")) { + transformedData = JSON.parse(data); + } + return transformedData; + }] + }; + if (skipConnectionTimeout !== true) { + requestOptions.timeout = _this.connectionTimeoutSeconds * 1000; + } + if (queryParameters && Object.keys(queryParameters).length !== 0) { + requestOptions.params = queryParameters; + } + if (_this.sendApiKeyAsQueryParam) { + requestOptions.params = requestOptions.params || {}; + requestOptions.params["x-typesense-api-key"] = _this.apiKey; + } + if (bodyParameters && (typeof bodyParameters === "string" && bodyParameters.length !== 0 || (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(bodyParameters) === "object" && Object.keys(bodyParameters).length !== 0)) { + requestOptions.data = bodyParameters; + } + + // Translate from user-provided AbortController to the Axios request cancel mechanism. + if (abortSignal) { + cancelToken = axios__WEBPACK_IMPORTED_MODULE_7__["default"].CancelToken; + source = cancelToken.source(); + abortListener = function abortListener() { + return source.cancel(); + }; + abortSignal.addEventListener("abort", abortListener); + requestOptions.cancelToken = source.token; + } + _context6.next = 13; + return (0,axios__WEBPACK_IMPORTED_MODULE_7__["default"])(requestOptions); + case 13: + response = _context6.sent; + if (response.status >= 1 && response.status <= 499) { + // Treat any status code > 0 and < 500 to be an indication that node is healthy + // We exclude 0 since some clients return 0 when request fails + _this.setNodeHealthcheck(node, HEALTHY); + } + _this.logger.debug("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " was made. Response Code was ").concat(response.status, ".")); + if (!(response.status >= 200 && response.status < 300)) { + _context6.next = 20; + break; + } + return _context6.abrupt("return", { + v: Promise.resolve(response.data) + }); + case 20: + if (!(response.status < 500)) { + _context6.next = 24; + break; + } + return _context6.abrupt("return", { + v: Promise.reject(_this.customErrorForResponse(response, (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.message)) + }); + case 24: + throw _this.customErrorForResponse(response, (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.message); + case 25: + _context6.next = 35; + break; + case 27: + _context6.prev = 27; + _context6.t0 = _context6["catch"](4); + // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts + _this.setNodeHealthcheck(node, UNHEALTHY); + lastException = _context6.t0; + _this.logger.warn("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " failed due to \"").concat(_context6.t0.code, " ").concat(_context6.t0.message).concat(_context6.t0.response == null ? "" : " - " + JSON.stringify((_error$response = _context6.t0.response) === null || _error$response === void 0 ? void 0 : _error$response.data), "\"")); + // this.logger.debug(error.stack) + _this.logger.warn("Request #".concat(requestNumber, ": Sleeping for ").concat(_this.retryIntervalSeconds, "s and then retrying request...")); + _context6.next = 35; + return _this.timer(_this.retryIntervalSeconds); + case 35: + _context6.prev = 35; + if (abortSignal && abortListener) { + abortSignal.removeEventListener("abort", abortListener); + } + return _context6.finish(35); + case 38: + case "end": + return _context6.stop(); + } + }, _loop, null, [[4, 27, 35, 38]]); + }); + numTries = 1; + case 6: + if (!(numTries <= this.numRetriesPerRequest + 1)) { + _context7.next = 14; + break; + } + return _context7.delegateYield(_loop(), "t0", 8); + case 8: + _ret = _context7.t0; + if (!_ret) { + _context7.next = 11; + break; + } + return _context7.abrupt("return", _ret.v); + case 11: + numTries++; + _context7.next = 6; + break; + case 14: + this.logger.debug("Request #".concat(requestNumber, ": No retries left. Raising last error")); + return _context7.abrupt("return", Promise.reject(lastException)); + case 16: + case "end": + return _context7.stop(); + } + }, _callee6, this); + })); + function performRequest(_x6, _x7, _x8) { + return _performRequest.apply(this, arguments); + } + return performRequest; + }() // Attempts to find the next healthy node, looping through the list of nodes once. + // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy + // so we can try the request for good measure, in case that node has become healthy since + }, { + key: "getNextNode", + value: function getNextNode() { + var requestNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + // Check if nearestNode is set and is healthy, if so return it + if (this.nearestNode != null) { + this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: Node ").concat(this.nearestNode.index, " is ").concat(this.nearestNode.isHealthy === true ? "Healthy" : "Unhealthy")); + if (this.nearestNode.isHealthy === true || this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) { + this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(this.nearestNode.index)); + return this.nearestNode; } - reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel); - request.abort(); - request = null; - }; + this.logger.debug("Request #".concat(requestNumber, ": Falling back to individual nodes")); + } + + // Fallback to nodes as usual + this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: ").concat(this.nodes.map(function (node) { + return "Node ".concat(node.index, " is ").concat(node.isHealthy === true ? "Healthy" : "Unhealthy"); + }).join(" || "))); + var candidateNode = this.nodes[0]; + for (var i = 0; i <= this.nodes.length; i++) { + this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length; + candidateNode = this.nodes[this.currentNodeIndex]; + if (candidateNode.isHealthy === true || this.nodeDueForHealthcheck(candidateNode, requestNumber)) { + this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(candidateNode.index)); + return candidateNode; + } + } - config.cancelToken && config.cancelToken.subscribe(onCanceled); - if (config.signal) { - config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); + // None of the nodes are marked healthy, but some of them could have become healthy since last health check. + // So we will just return the next node. + this.logger.debug("Request #".concat(requestNumber, ": No healthy nodes were found. Returning the next node, Node ").concat(candidateNode.index)); + return candidateNode; + } + }, { + key: "nodeDueForHealthcheck", + value: function nodeDueForHealthcheck(node) { + var requestNumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp > this.healthcheckIntervalSeconds * 1000; + if (isDueForHealthcheck) { + this.logger.debug("Request #".concat(requestNumber, ": Node ").concat(node.index, " has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds, ". Adding it back into rotation.")); + } + return isDueForHealthcheck; + } + }, { + key: "initializeMetadataForNodes", + value: function initializeMetadataForNodes() { + var _this2 = this; + if (this.nearestNode != null) { + this.nearestNode.index = "nearestNode"; + this.setNodeHealthcheck(this.nearestNode, HEALTHY); + } + this.nodes.forEach(function (node, i) { + node.index = i; + _this2.setNodeHealthcheck(node, HEALTHY); + }); + } + }, { + key: "setNodeHealthcheck", + value: function setNodeHealthcheck(node, isHealthy) { + node.isHealthy = isHealthy; + node.lastAccessTimestamp = Date.now(); + } + }, { + key: "uriFor", + value: function uriFor(endpoint, node) { + if (node.url != null) { + return "".concat(node.url).concat(endpoint); + } + return "".concat(node.protocol, "://").concat(node.host, ":").concat(node.port).concat(node.path).concat(endpoint); + } + }, { + key: "defaultHeaders", + value: function defaultHeaders() { + var defaultHeaders = {}; + if (!this.sendApiKeyAsQueryParam) { + defaultHeaders[APIKEYHEADERNAME] = this.apiKey; + } + defaultHeaders["Content-Type"] = "application/json"; + return defaultHeaders; + } + }, { + key: "timer", + value: function () { + var _timer = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee7(seconds) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee7$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + return _context8.abrupt("return", new Promise(function (resolve) { + return setTimeout(resolve, seconds * 1000); + })); + case 1: + case "end": + return _context8.stop(); + } + }, _callee7); + })); + function timer(_x9) { + return _timer.apply(this, arguments); + } + return timer; + }() + }, { + key: "customErrorForResponse", + value: function customErrorForResponse(response, messageFromServer) { + var errorMessage = "Request failed with HTTP code ".concat(response.status); + if (typeof messageFromServer === "string" && messageFromServer.trim() !== "") { + errorMessage += " | Server said: ".concat(messageFromServer); + } + var error = new _Errors_TypesenseError__WEBPACK_IMPORTED_MODULE_6__["default"](errorMessage); + if (response.status === 400) { + error = new _Errors__WEBPACK_IMPORTED_MODULE_5__.RequestMalformed(errorMessage); + } else if (response.status === 401) { + error = new _Errors__WEBPACK_IMPORTED_MODULE_5__.RequestUnauthorized(errorMessage); + } else if (response.status === 404) { + error = new _Errors__WEBPACK_IMPORTED_MODULE_5__.ObjectNotFound(errorMessage); + } else if (response.status === 409) { + error = new _Errors__WEBPACK_IMPORTED_MODULE_5__.ObjectAlreadyExists(errorMessage); + } else if (response.status === 422) { + error = new _Errors__WEBPACK_IMPORTED_MODULE_5__.ObjectUnprocessable(errorMessage); + } else if (response.status >= 500 && response.status <= 599) { + error = new _Errors__WEBPACK_IMPORTED_MODULE_5__.ServerError(errorMessage); + } else { + error = new _Errors__WEBPACK_IMPORTED_MODULE_5__.HTTPError(errorMessage); } + error.httpStatus = response.status; + return error; } + }]); + return ApiCall; +}(); - if (!requestData) { - requestData = null; - } - // Send the request - request.send(requestData); - }); -}; +/***/ }), -},{"../cancel/Cancel":6,"../core/buildFullPath":11,"../core/createError":12,"../defaults":18,"./../core/settle":16,"./../helpers/buildURL":21,"./../helpers/cookies":23,"./../helpers/isURLSameOrigin":26,"./../helpers/parseHeaders":28,"./../utils":31}],31:[function(require,module,exports){ -'use strict'; +/***/ "./src/Typesense/Client.ts": +/*!*********************************!*\ + !*** ./src/Typesense/Client.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -var bind = require('./helpers/bind'); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Client) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _Configuration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Configuration */ "./src/Typesense/Configuration.ts"); +/* harmony import */ var _ApiCall__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ApiCall */ "./src/Typesense/ApiCall.ts"); +/* harmony import */ var _Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Collections */ "./src/Typesense/Collections.ts"); +/* harmony import */ var _Collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Collection */ "./src/Typesense/Collection.ts"); +/* harmony import */ var _Aliases__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Aliases */ "./src/Typesense/Aliases.ts"); +/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Alias */ "./src/Typesense/Alias.ts"); +/* harmony import */ var _Keys__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Keys */ "./src/Typesense/Keys.ts"); +/* harmony import */ var _Key__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Key */ "./src/Typesense/Key.ts"); +/* harmony import */ var _Debug__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Debug */ "./src/Typesense/Debug.ts"); +/* harmony import */ var _Metrics__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Metrics */ "./src/Typesense/Metrics.ts"); +/* harmony import */ var _Health__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Health */ "./src/Typesense/Health.ts"); +/* harmony import */ var _Operations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Operations */ "./src/Typesense/Operations.ts"); +/* harmony import */ var _MultiSearch__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./MultiSearch */ "./src/Typesense/MultiSearch.ts"); +/* harmony import */ var _Presets__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Presets */ "./src/Typesense/Presets.ts"); +/* harmony import */ var _Preset__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Preset */ "./src/Typesense/Preset.ts"); +/* harmony import */ var _Analytics__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Analytics */ "./src/Typesense/Analytics.ts"); -// utils is a library of generic helper functions non-specific to axios -var toString = Object.prototype.toString; +/* eslint-disable no-dupe-class-members */ -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -function isArray(val) { - return Array.isArray(val); -} - -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} - -/** - * Determine if a value is a Buffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; -} - -/** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ -function isFormData(val) { - return toString.call(val) === '[object FormData]'; -} - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ -function isString(val) { - return typeof val === 'string'; -} - -/** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ -function isNumber(val) { - return typeof val === 'number'; -} - -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -function isObject(val) { - return val !== null && typeof val === 'object'; -} - -/** - * Determine if a value is a plain Object - * - * @param {Object} val The value to test - * @return {boolean} True if value is a plain Object, otherwise false - */ -function isPlainObject(val) { - if (toString.call(val) !== '[object Object]') { - return false; - } - - var prototype = Object.getPrototypeOf(val); - return prototype === null || prototype === Object.prototype; -} - -/** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -function isDate(val) { - return toString.call(val) === '[object Date]'; -} - -/** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -function isFile(val) { - return toString.call(val) === '[object File]'; -} - -/** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ -function isBlob(val) { - return toString.call(val) === '[object Blob]'; -} - -/** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -function isFunction(val) { - return toString.call(val) === '[object Function]'; -} - -/** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ -function isStream(val) { - return isObject(val) && isFunction(val.pipe); -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -function isURLSearchParams(val) { - return toString.call(val) === '[object URLSearchParams]'; -} - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ -function trim(str) { - return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); -} - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ -function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); -} - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } -} - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (isPlainObject(result[key]) && isPlainObject(val)) { - result[key] = merge(result[key], val); - } else if (isPlainObject(val)) { - result[key] = merge({}, val); - } else if (isArray(val)) { - result[key] = val.slice(); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ -function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * @return {string} content value without BOM - */ -function stripBOM(content) { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isPlainObject: isPlainObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - /* common-shake removed: isFunction: isFunction */ - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim, - /* common-shake removed: stripBOM: stripBOM */ -}; - -},{"./helpers/bind":20}],18:[function(require,module,exports){ -(function (process){(function (){ -'use strict'; - -var utils = require('./utils'); -var normalizeHeaderName = require('./helpers/normalizeHeaderName'); -var enhanceError = require('./core/enhanceError'); - -var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' -}; - -function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } -} - -function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = require('./adapters/xhr'); - } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = require('./adapters/http'); - } - return adapter; -} - -function stringifySafely(rawValue, parser, encoder) { - if (utils.isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return utils.trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - - return (encoder || JSON.stringify)(rawValue); -} - -var defaults = { - - transitional: { - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false - }, - - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) { - setContentTypeIfUnset(headers, 'application/json'); - return stringifySafely(data); - } - return data; - }], - - transformResponse: [function transformResponse(data) { - var transitional = this.transitional || defaults.transitional; - var silentJSONParsing = transitional && transitional.silentJSONParsing; - var forcedJSONParsing = transitional && transitional.forcedJSONParsing; - var strictJSONParsing = !silentJSONParsing && this.responseType === 'json'; - - if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) { - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw enhanceError(e, this, 'E_JSON_PARSE'); - } - throw e; - } - } - } - - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - - headers: { - common: { - 'Accept': 'application/json, text/plain, */*' - } - } -}; - -utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -}); - -module.exports = defaults; - -}).call(this)}).call(this,require('_process')) - -},{"./adapters/http":4,"./adapters/xhr":4,"./core/enhanceError":14,"./helpers/normalizeHeaderName":27,"./utils":31,"_process":37}],21:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ -module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); - }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -}; - -},{"./../utils":31}],6:[function(require,module,exports){ -'use strict'; - -/** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ -function Cancel(message) { - this.message = message; -} - -Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); -}; - -Cancel.prototype.__CANCEL__ = true; - -module.exports = Cancel; - -},{}],28:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; -}; - -},{"./../utils":31}],23:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() -); - -},{"./../utils":31}],26:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() -); - -},{"./../utils":31}],16:[function(require,module,exports){ -'use strict'; - -var createError = require('./createError'); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ -module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } -}; - -},{"./createError":12}],12:[function(require,module,exports){ -'use strict'; - -var enhanceError = require('./enhanceError'); - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ -module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); -}; - -},{"./enhanceError":14}],11:[function(require,module,exports){ -'use strict'; - -var isAbsoluteURL = require('../helpers/isAbsoluteURL'); -var combineURLs = require('../helpers/combineURLs'); - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * @returns {string} The combined full path - */ -module.exports = function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -}; - -},{"../helpers/combineURLs":22,"../helpers/isAbsoluteURL":24}],20:[function(require,module,exports){ -'use strict'; - -module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; -}; - -},{}],29:[function(require,module,exports){ -'use strict'; - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ -module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -}; - -},{}],8:[function(require,module,exports){ -'use strict'; - -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; - -},{}],19:[function(require,module,exports){ -module.exports = { - "version": "0.26.0" -}; - -},{}],15:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils'); - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ -module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - function getMergedValue(target, source) { - if (utils.isPlainObject(target) && utils.isPlainObject(source)) { - return utils.merge(target, source); - } else if (utils.isPlainObject(source)) { - return utils.merge({}, source); - } else if (utils.isArray(source)) { - return source.slice(); - } - return source; - } - - // eslint-disable-next-line consistent-return - function mergeDeepProperties(prop) { - if (!utils.isUndefined(config2[prop])) { - return getMergedValue(config1[prop], config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - return getMergedValue(undefined, config1[prop]); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - return getMergedValue(undefined, config2[prop]); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - return getMergedValue(undefined, config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - return getMergedValue(undefined, config1[prop]); - } - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(prop) { - if (prop in config2) { - return getMergedValue(config1[prop], config2[prop]); - } else if (prop in config1) { - return getMergedValue(undefined, config1[prop]); - } - } - - var mergeMap = { - 'url': valueFromConfig2, - 'method': valueFromConfig2, - 'data': valueFromConfig2, - 'baseURL': defaultToConfig2, - 'transformRequest': defaultToConfig2, - 'transformResponse': defaultToConfig2, - 'paramsSerializer': defaultToConfig2, - 'timeout': defaultToConfig2, - 'timeoutMessage': defaultToConfig2, - 'withCredentials': defaultToConfig2, - 'adapter': defaultToConfig2, - 'responseType': defaultToConfig2, - 'xsrfCookieName': defaultToConfig2, - 'xsrfHeaderName': defaultToConfig2, - 'onUploadProgress': defaultToConfig2, - 'onDownloadProgress': defaultToConfig2, - 'decompress': defaultToConfig2, - 'maxContentLength': defaultToConfig2, - 'maxBodyLength': defaultToConfig2, - 'transport': defaultToConfig2, - 'httpAgent': defaultToConfig2, - 'httpsAgent': defaultToConfig2, - 'cancelToken': defaultToConfig2, - 'socketPath': defaultToConfig2, - 'responseEncoding': defaultToConfig2, - 'validateStatus': mergeDirectKeys - }; - - utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) { - var merge = mergeMap[prop] || mergeDeepProperties; - var configValue = merge(prop); - (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); - }); - - return config; -}; - -},{"../utils":31}],25:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -module.exports = function isAxiosError(payload) { - return utils.isObject(payload) && (payload.isAxiosError === true); -}; - -},{"./../utils":31}],7:[function(require,module,exports){ -'use strict'; - -var Cancel = require('./Cancel'); - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ -function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - - // eslint-disable-next-line func-names - this.promise.then(function(cancel) { - if (!token._listeners) return; - - var i; - var l = token._listeners.length; - - for (i = 0; i < l; i++) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = function(onfulfilled) { - var _resolve; - // eslint-disable-next-line func-names - var promise = new Promise(function(resolve) { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - - return promise; - }; - - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new Cancel(message); - resolvePromise(token.reason); - }); -} - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } -}; - -/** - * Subscribe to the cancel signal - */ - -CancelToken.prototype.subscribe = function subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } -}; - -/** - * Unsubscribe from the cancel signal - */ - -CancelToken.prototype.unsubscribe = function unsubscribe(listener) { - if (!this._listeners) { - return; - } - var index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } -}; - -/** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ -CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; -}; - -module.exports = CancelToken; - -},{"./Cancel":6}],9:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); -var buildURL = require('../helpers/buildURL'); -var InterceptorManager = require('./InterceptorManager'); -var dispatchRequest = require('./dispatchRequest'); -var mergeConfig = require('./mergeConfig'); -var validator = require('../helpers/validator'); - -var validators = validator.validators; -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ -function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; -} - -/** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ -Axios.prototype.request = function request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - - config = mergeConfig(this.defaults, config); - - // Set config.method - if (config.method) { - config.method = config.method.toLowerCase(); - } else if (this.defaults.method) { - config.method = this.defaults.method.toLowerCase(); - } else { - config.method = 'get'; - } - - var transitional = config.transitional; - - if (transitional !== undefined) { - validator.assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - - // filter out skipped interceptors - var requestInterceptorChain = []; - var synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - var responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - - var promise; - - if (!synchronousRequestInterceptors) { - var chain = [dispatchRequest, undefined]; - - Array.prototype.unshift.apply(chain, requestInterceptorChain); - chain = chain.concat(responseInterceptorChain); - - promise = Promise.resolve(config); - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); - } - - return promise; - } - - - var newConfig = config; - while (requestInterceptorChain.length) { - var onFulfilled = requestInterceptorChain.shift(); - var onRejected = requestInterceptorChain.shift(); - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected(error); - break; - } - } - - try { - promise = dispatchRequest(newConfig); - } catch (error) { - return Promise.reject(error); - } - - while (responseInterceptorChain.length) { - promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift()); - } - - return promise; -}; - -Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); -}; - -// Provide aliases for supported request methods -utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: (config || {}).data - })); - }; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, data, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: data - })); - }; -}); - -module.exports = Axios; - -},{"../helpers/buildURL":21,"../helpers/validator":30,"./../utils":31,"./InterceptorManager":10,"./dispatchRequest":13,"./mergeConfig":15}],10:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -function InterceptorManager() { - this.handlers = []; -} - -/** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ -InterceptorManager.prototype.use = function use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; -}; - -/** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ -InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } -}; - -/** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ -InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); -}; - -module.exports = InterceptorManager; - -},{"./../utils":31}],30:[function(require,module,exports){ -'use strict'; - -var VERSION = require('../env/data').version; - -var validators = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) { - validators[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); - -var deprecatedWarnings = {}; - -/** - * Transitional option validator - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * @returns {function} - */ -validators.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return function(value, opt, opts) { - if (validator === false) { - throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : ''))); - } - - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn( - formatMessage( - opt, - ' has been deprecated since v' + version + ' and will be removed in the near future' - ) - ); - } - - return validator ? validator(value, opt, opts) : true; - }; -}; - -/** - * Assert object's properties type - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new TypeError('options must be an object'); - } - var keys = Object.keys(options); - var i = keys.length; - while (i-- > 0) { - var opt = keys[i]; - var validator = schema[opt]; - if (validator) { - var value = options[opt]; - var result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new TypeError('option ' + opt + ' must be ' + result); - } - continue; - } - if (allowUnknown !== true) { - throw Error('Unknown option ' + opt); - } - } -} - -module.exports = { - assertOptions: assertOptions, - validators: validators -}; - -},{"../env/data":19}],13:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); -var transformData = require('./transformData'); -var isCancel = require('../cancel/isCancel'); -var defaults = require('../defaults'); -var Cancel = require('../cancel/Cancel'); - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - - if (config.signal && config.signal.aborted) { - throw new Cancel('canceled'); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ -module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); - - // Ensure headers exist - config.headers = config.headers || {}; - - // Transform request data - config.data = transformData.call( - config, - config.data, - config.headers, - config.transformRequest - ); - - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers - ); - - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); - - var adapter = config.adapter || defaults.adapter; - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData.call( - config, - response.data, - response.headers, - config.transformResponse - ); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData.call( - config, - reason.response.data, - reason.response.headers, - config.transformResponse - ); - } - } - - return Promise.reject(reason); - }); -}; - -},{"../cancel/Cancel":6,"../cancel/isCancel":8,"../defaults":18,"./../utils":31,"./transformData":17}],24:[function(require,module,exports){ -'use strict'; - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -}; - -},{}],22:[function(require,module,exports){ -'use strict'; - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ -module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -}; - -},{}],14:[function(require,module,exports){ -'use strict'; - -/** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ -module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } - - error.request = request; - error.response = response; - error.isAxiosError = true; - - error.toJSON = function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code, - status: this.response && this.response.status ? this.response.status : null - }; - }; - return error; -}; - -},{}],17:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); -var defaults = require('./../defaults'); - -/** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ -module.exports = function transformData(data, headers, fns) { - var context = this || defaults; - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn.call(context, data, headers); - }); - - return data; -}; - -},{"./../defaults":18,"./../utils":31}],37:[function(require,module,exports){ -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],27:[function(require,module,exports){ -'use strict'; - -var utils = require('../utils'); - -module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); -}; - -},{"../utils":31}],32:[function(require,module,exports){ -'use strict' - -/* common-shake removed: exports.byteLength = */ void byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i -} - -// Support decoding URL-safe base64 strings, as Node.js does. -// See: https://en.wikipedia.org/wiki/Base64#URL_applications -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 - -function getLens (b64) { - var len = b64.length - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] -} - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - - return parts.join('') -} - -},{}],33:[function(require,module,exports){ - -},{}],34:[function(require,module,exports){ -(function (Buffer){(function (){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = require('base64-js') -var ieee754 = require('ieee754') - -exports.Buffer = Buffer -/* common-shake removed: exports.SlowBuffer = */ void SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -var K_MAX_LENGTH = 0x7fffffff -/* common-shake removed: exports.kMaxLength = */ void K_MAX_LENGTH - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Print warning and recommend using `buffer` v4.x which has an Object - * implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * We report that the browser does not support typed arrays if the are not subclassable - * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` - * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support - * for __proto__ and has a buggy typed array implementation. - */ -Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() - -if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && - typeof console.error === 'function') { - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by ' + - '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ) -} - -function typedArraySupport () { - // Can typed array instances can be augmented? - try { - var arr = new Uint8Array(1) - arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } - return arr.foo() === 42 - } catch (e) { - return false - } -} - -Object.defineProperty(Buffer.prototype, 'parent', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.buffer - } -}) - -Object.defineProperty(Buffer.prototype, 'offset', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.byteOffset - } -}) - -function createBuffer (length) { - if (length > K_MAX_LENGTH) { - throw new RangeError('The value "' + length + '" is invalid for option "size"') - } - // Return an augmented `Uint8Array` instance - var buf = new Uint8Array(length) - buf.__proto__ = Buffer.prototype - return buf -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new TypeError( - 'The "string" argument must be of type string. Received type number' - ) - } - return allocUnsafe(arg) - } - return from(arg, encodingOrOffset, length) -} - -// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 -if (typeof Symbol !== 'undefined' && Symbol.species != null && - Buffer[Symbol.species] === Buffer) { - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true, - enumerable: false, - writable: false - }) -} - -Buffer.poolSize = 8192 // not used by this implementation - -function from (value, encodingOrOffset, length) { - if (typeof value === 'string') { - return fromString(value, encodingOrOffset) - } - - if (ArrayBuffer.isView(value)) { - return fromArrayLike(value) - } - - if (value == null) { - throw TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) - } - - if (isInstance(value, ArrayBuffer) || - (value && isInstance(value.buffer, ArrayBuffer))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof value === 'number') { - throw new TypeError( - 'The "value" argument must not be of type number. Received type number' - ) - } - - var valueOf = value.valueOf && value.valueOf() - if (valueOf != null && valueOf !== value) { - return Buffer.from(valueOf, encodingOrOffset, length) - } - - var b = fromObject(value) - if (b) return b - - if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && - typeof value[Symbol.toPrimitive] === 'function') { - return Buffer.from( - value[Symbol.toPrimitive]('string'), encodingOrOffset, length - ) - } - - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(value, encodingOrOffset, length) -} - -// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: -// https://github.com/feross/buffer/pull/148 -Buffer.prototype.__proto__ = Uint8Array.prototype -Buffer.__proto__ = Uint8Array - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be of type number') - } else if (size < 0) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } -} - -function alloc (size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(size).fill(fill, encoding) - : createBuffer(size).fill(fill) - } - return createBuffer(size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(size, fill, encoding) -} - -function allocUnsafe (size) { - assertSize(size) - return createBuffer(size < 0 ? 0 : checked(size) | 0) -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(size) -} - -function fromString (string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - - var length = byteLength(string, encoding) | 0 - var buf = createBuffer(length) - - var actual = buf.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - buf = buf.slice(0, actual) - } - - return buf -} - -function fromArrayLike (array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - var buf = createBuffer(length) - for (var i = 0; i < length; i += 1) { - buf[i] = array[i] & 255 - } - return buf -} - -function fromArrayBuffer (array, byteOffset, length) { - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('"offset" is outside of buffer bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('"length" is outside of buffer bounds') - } - - var buf - if (byteOffset === undefined && length === undefined) { - buf = new Uint8Array(array) - } else if (length === undefined) { - buf = new Uint8Array(array, byteOffset) - } else { - buf = new Uint8Array(array, byteOffset, length) - } - - // Return an augmented `Uint8Array` instance - buf.__proto__ = Buffer.prototype - return buf -} - -function fromObject (obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - var buf = createBuffer(len) - - if (buf.length === 0) { - return buf - } - - obj.copy(buf, 0, 0, len) - return buf - } - - if (obj.length !== undefined) { - if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { - return createBuffer(0) - } - return fromArrayLike(obj) - } - - if (obj.type === 'Buffer' && Array.isArray(obj.data)) { - return fromArrayLike(obj.data) - } -} - -function checked (length) { - // Note: cannot use `length < K_MAX_LENGTH` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= K_MAX_LENGTH) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return b != null && b._isBuffer === true && - b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false -} - -Buffer.compare = function compare (a, b) { - if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) - if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError( - 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' - ) - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!Array.isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (isInstance(buf, Uint8Array)) { - buf = Buffer.from(buf) - } - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + - 'Received type ' + typeof string - ) - } - - var len = string.length - var mustMatch = (arguments.length > 2 && arguments[2] === true) - if (!mustMatch && len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) { - return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 - } - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) -// to detect a Buffer instance. It's not possible to use `instanceof Buffer` -// reliably in a browserify context because there could be multiple different -// copies of the 'buffer' package in use. This method works even for Buffer -// instances that were created from another copy of the `buffer` package. -// See: https://github.com/feross/buffer/issues/154 -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.toLocaleString = Buffer.prototype.toString - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() - if (this.length > max) str += ' ... ' - return '' -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (isInstance(target, Uint8Array)) { - target = Buffer.from(target, target.offset, target.byteLength) - } - if (!Buffer.isBuffer(target)) { - throw new TypeError( - 'The "target" argument must be one of type Buffer or Uint8Array. ' + - 'Received type ' + (typeof target) - ) - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (numberIsNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - var strLen = string.length - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (numberIsNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset >>> 0 - if (isFinite(length)) { - length = length >>> 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - if (!encoding) encoding = 'utf8' - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - case 'ascii': - return asciiWrite(this, string, offset, length) - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) +var Client = /*#__PURE__*/function () { + function Client(options) { + var _options$sendApiKeyAs; + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Client); + options.sendApiKeyAsQueryParam = (_options$sendApiKeyAs = options.sendApiKeyAsQueryParam) !== null && _options$sendApiKeyAs !== void 0 ? _options$sendApiKeyAs : false; + this.configuration = new _Configuration__WEBPACK_IMPORTED_MODULE_2__["default"](options); + this.apiCall = new _ApiCall__WEBPACK_IMPORTED_MODULE_3__["default"](this.configuration); + this.debug = new _Debug__WEBPACK_IMPORTED_MODULE_10__["default"](this.apiCall); + this.metrics = new _Metrics__WEBPACK_IMPORTED_MODULE_11__["default"](this.apiCall); + this.health = new _Health__WEBPACK_IMPORTED_MODULE_12__["default"](this.apiCall); + this.operations = new _Operations__WEBPACK_IMPORTED_MODULE_13__["default"](this.apiCall); + this.multiSearch = new _MultiSearch__WEBPACK_IMPORTED_MODULE_14__["default"](this.apiCall, this.configuration); + this._collections = new _Collections__WEBPACK_IMPORTED_MODULE_4__["default"](this.apiCall); + this.individualCollections = {}; + this._aliases = new _Aliases__WEBPACK_IMPORTED_MODULE_6__["default"](this.apiCall); + this.individualAliases = {}; + this._keys = new _Keys__WEBPACK_IMPORTED_MODULE_8__["default"](this.apiCall); + this.individualKeys = {}; + this._presets = new _Presets__WEBPACK_IMPORTED_MODULE_15__["default"](this.apiCall); + this.individualPresets = {}; + this.analytics = new _Analytics__WEBPACK_IMPORTED_MODULE_17__["default"](this.apiCall); } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Client, [{ + key: "collections", + value: function collections(collectionName) { + if (collectionName === undefined) { + return this._collections; + } else { + if (this.individualCollections[collectionName] === undefined) { + this.individualCollections[collectionName] = new _Collection__WEBPACK_IMPORTED_MODULE_5__["default"](collectionName, this.apiCall, this.configuration); + } + return this.individualCollections[collectionName]; } } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF + }, { + key: "aliases", + value: function aliases(aliasName) { + if (aliasName === undefined) { + return this._aliases; + } else { + if (this.individualAliases[aliasName] === undefined) { + this.individualAliases[aliasName] = new _Alias__WEBPACK_IMPORTED_MODULE_7__["default"](aliasName, this.apiCall); + } + return this.individualAliases[aliasName]; + } } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; ++i) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf = this.subarray(start, end) - // Return an augmented `Uint8Array` instance - newBuf.__proto__ = Buffer.prototype - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 + }, { + key: "keys", + value: function keys(id) { + if (id === undefined) { + return this._keys; + } else { + if (this.individualKeys[id] === undefined) { + this.individualKeys[id] = new _Key__WEBPACK_IMPORTED_MODULE_9__["default"](id, this.apiCall); + } + return this.individualKeys[id]; + } } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - var limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 + }, { + key: "presets", + value: function presets(id) { + if (id === undefined) { + return this._presets; + } else { + if (this.individualPresets[id] === undefined) { + this.individualPresets[id] = new _Preset__WEBPACK_IMPORTED_MODULE_16__["default"](id, this.apiCall); + } + return this.individualPresets[id]; + } } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} + }]); + return Client; +}(); -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - return offset + 4 -} -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} +/***/ }), -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} +/***/ "./src/Typesense/Collection.ts": +/*!*************************************!*\ + !*** ./src/Typesense/Collection.ts ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -function writeFloat (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Collection) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _Collections__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Collections */ "./src/Typesense/Collections.ts"); +/* harmony import */ var _Documents__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Documents */ "./src/Typesense/Documents.ts"); +/* harmony import */ var _Errors__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Errors */ "./src/Typesense/Errors/index.ts"); +/* harmony import */ var _Overrides__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Overrides */ "./src/Typesense/Overrides.ts"); +/* harmony import */ var _Override__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Override */ "./src/Typesense/Override.ts"); +/* harmony import */ var _Synonyms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Synonyms */ "./src/Typesense/Synonyms.ts"); +/* harmony import */ var _Synonym__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Synonym */ "./src/Typesense/Synonym.ts"); +/* harmony import */ var _Document__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Document */ "./src/Typesense/Document.ts"); -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} -function writeDouble (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('Index out of range') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - var len = end - start - if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { - // Use built-in when available, missing from IE11 - this.copyWithin(targetStart, start, end) - } else if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (var i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, end), - targetStart - ) - } - return len -} -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if ((encoding === 'utf8' && code < 128) || - encoding === 'latin1') { - // Fast path: If `val` fits into a single byte, use that numeric value. - val = code +var Collection = /*#__PURE__*/function () { + function Collection(name, apiCall, configuration) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Collection); + (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])(this, "individualDocuments", {}); + (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])(this, "individualOverrides", {}); + (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])(this, "individualSynonyms", {}); + this.name = name; + this.apiCall = apiCall; + this.configuration = configuration; + this.name = name; + this.apiCall = apiCall; + this.configuration = configuration; + this._documents = new _Documents__WEBPACK_IMPORTED_MODULE_6__["default"](this.name, this.apiCall, this.configuration); + this._overrides = new _Overrides__WEBPACK_IMPORTED_MODULE_8__["default"](this.name, this.apiCall); + this._synonyms = new _Synonyms__WEBPACK_IMPORTED_MODULE_10__["default"](this.name, this.apiCall); + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Collection, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "update", + value: function () { + var _update = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee2(schema) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.patch(this.endpointPath(), schema)); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function update(_x) { + return _update.apply(this, arguments); + } + return update; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee3() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", this.apiCall.delete(this.endpointPath())); + case 1: + case "end": + return _context3.stop(); + } + }, _callee3, this); + })); + function _delete() { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "exists", + value: function () { + var _exists = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee4() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + _context4.prev = 0; + _context4.next = 3; + return this.retrieve(); + case 3: + return _context4.abrupt("return", true); + case 6: + _context4.prev = 6; + _context4.t0 = _context4["catch"](0); + if (!(_context4.t0 instanceof _Errors__WEBPACK_IMPORTED_MODULE_7__.ObjectNotFound)) { + _context4.next = 10; + break; + } + return _context4.abrupt("return", false); + case 10: + throw _context4.t0; + case 11: + case "end": + return _context4.stop(); + } + }, _callee4, this, [[0, 6]]); + })); + function exists() { + return _exists.apply(this, arguments); + } + return exists; + }() + }, { + key: "documents", + value: function documents(documentId) { + if (!documentId) { + return this._documents; + } else { + if (this.individualDocuments[documentId] === undefined) { + this.individualDocuments[documentId] = new _Document__WEBPACK_IMPORTED_MODULE_12__.Document(this.name, documentId, this.apiCall); + } + return this.individualDocuments[documentId]; } } - } else if (typeof val === 'number') { - val = val & 255 - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val + }, { + key: "overrides", + value: function overrides(overrideId) { + if (overrideId === undefined) { + return this._overrides; + } else { + if (this.individualOverrides[overrideId] === undefined) { + this.individualOverrides[overrideId] = new _Override__WEBPACK_IMPORTED_MODULE_9__["default"](this.name, overrideId, this.apiCall); + } + return this.individualOverrides[overrideId]; + } } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : Buffer.from(val, encoding) - var len = bytes.length - if (len === 0) { - throw new TypeError('The value "' + val + - '" is invalid for argument "value"') + }, { + key: "synonyms", + value: function synonyms(synonymId) { + if (synonymId === undefined) { + return this._synonyms; + } else { + if (this.individualSynonyms[synonymId] === undefined) { + this.individualSynonyms[synonymId] = new _Synonym__WEBPACK_IMPORTED_MODULE_11__["default"](this.name, synonymId, this.apiCall); + } + return this.individualSynonyms[synonymId]; + } } - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] + }, { + key: "endpointPath", + value: function endpointPath() { + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_5__["default"].RESOURCEPATH, "/").concat(this.name); } - } - - return this -} - -// HELPER FUNCTIONS -// ================ + }]); + return Collection; +}(); -var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g -function base64clean (str) { - // Node takes equal signs as end of the Base64 encoding - str = str.split('=')[0] - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = str.trim().replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} +/***/ }), -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} +/***/ "./src/Typesense/Collections.ts": +/*!**************************************!*\ + !*** ./src/Typesense/Collections.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Collections) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); - // valid lead - leadSurrogate = codePoint - continue - } - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) +var RESOURCEPATH = "/collections"; +var Collections = /*#__PURE__*/function () { + function Collections(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Collections); + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Collections, [{ + key: "create", + value: function () { + var _create = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(schema) { + var options, + _args = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; + return _context.abrupt("return", this.apiCall.post(RESOURCEPATH, schema, options)); + case 2: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function create(_x) { + return _create.apply(this, arguments); + } + return create; + }() + }, { + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.get(RESOURCEPATH)); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }], [{ + key: "RESOURCEPATH", + get: function get() { + return RESOURCEPATH; } + }]); + return Collections; +}(); - leadSurrogate = null - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } +/***/ }), - return bytes -} +/***/ "./src/Typesense/Configuration.ts": +/*!****************************************!*\ + !*** ./src/Typesense/Configuration.ts ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Configuration) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! loglevel */ "./node_modules/loglevel/lib/loglevel.js"); +/* harmony import */ var loglevel__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(loglevel__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Errors */ "./src/Typesense/Errors/index.ts"); -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - return byteArray -} +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} +var Configuration = /*#__PURE__*/function () { + function Configuration(options) { + var _this = this; + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Configuration); + this.nodes = options.nodes || []; + this.nodes = this.nodes.map(function (node) { + return _this.setDefaultPathInNode(node); + }).map(function (node) { + return _this.setDefaultPortInNode(node); + }).map(function (node) { + return _objectSpread({}, node); + }); // Make a deep copy -// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass -// the `instanceof` check but they should be treated as of that type. -// See: https://github.com/feross/buffer/issues/166 -function isInstance (obj, type) { - return obj instanceof type || - (obj != null && obj.constructor != null && obj.constructor.name != null && - obj.constructor.name === type.name) -} -function numberIsNaN (obj) { - // For IE11 support - return obj !== obj // eslint-disable-line no-self-compare -} + if (options.randomizeNodes == null) { + options.randomizeNodes = true; + } + if (options.randomizeNodes === true) { + this.shuffleArray(this.nodes); + } + this.nearestNode = options.nearestNode; + this.nearestNode = this.setDefaultPathInNode(this.nearestNode); + this.nearestNode = this.setDefaultPortInNode(this.nearestNode); + this.connectionTimeoutSeconds = options.connectionTimeoutSeconds || options.timeoutSeconds || 5; + this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60; + this.numRetries = options.numRetries || this.nodes.length + (this.nearestNode == null ? 0 : 1) || 3; + this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1; + this.apiKey = options.apiKey; + this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient -}).call(this)}).call(this,require("buffer").Buffer) - -},{"base64-js":32,"buffer":34,"ieee754":35}],35:[function(require,module,exports){ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias + this.cacheSearchResultsForSeconds = options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default + this.useServerSideSearchCache = options.useServerSideSearchCache || false; + this.logger = options.logger || loglevel__WEBPACK_IMPORTED_MODULE_3__; + this.logLevel = options.logLevel || "warn"; + this.logger.setLevel(this.logLevel); + this.additionalHeaders = options.additionalHeaders; + this.showDeprecationWarnings(options); + this.validate(); } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Configuration, [{ + key: "validate", + value: function validate() { + if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) { + throw new _Errors__WEBPACK_IMPORTED_MODULE_4__.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set"); + } + if (this.nearestNode != null && this.isNodeMissingAnyParameters(this.nearestNode)) { + throw new _Errors__WEBPACK_IMPORTED_MODULE_4__.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set"); + } + if (this.apiKey == null) { + throw new _Errors__WEBPACK_IMPORTED_MODULE_4__.MissingConfigurationError("Ensure that apiKey is set"); + } + return true; } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) + }, { + key: "validateNodes", + value: function validateNodes() { + var _this2 = this; + return this.nodes.some(function (node) { + return _this2.isNodeMissingAnyParameters(node); + }); } - if (value * c >= 2) { - e++ - c /= 2 + }, { + key: "isNodeMissingAnyParameters", + value: function isNodeMissingAnyParameters(node) { + return !["protocol", "host", "port", "path"].every(function (key) { + return node.hasOwnProperty(key); + }) && node["url"] == null; + } + }, { + key: "setDefaultPathInNode", + value: function setDefaultPathInNode(node) { + if (node != null && !node.hasOwnProperty("path")) { + node["path"] = ""; + } + return node; + } + }, { + key: "setDefaultPortInNode", + value: function setDefaultPortInNode(node) { + if (node != null && !node.hasOwnProperty("port") && node.hasOwnProperty("protocol")) { + switch (node["protocol"]) { + case "https": + node["port"] = 443; + break; + case "http": + node["port"] = 80; + break; + } + } + return node; } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 + }, { + key: "showDeprecationWarnings", + value: function showDeprecationWarnings(options) { + if (options.timeoutSeconds) { + this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"); + } + if (options.masterNode) { + this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"); + } + if (options.readReplicaNodes) { + this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12"); + } } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - -},{}],36:[function(require,module,exports){ -/* -* loglevel - https://github.com/pimterry/loglevel -* -* Copyright (c) 2013 Tim Perry -* Licensed under the MIT license. -*/ -(function (root, definition) { - "use strict"; - if (typeof define === 'function' && define.amd) { - define(definition); - } else if (typeof module === 'object' && module.exports) { - module.exports = definition(); - } else { - root.log = definition(); + }, { + key: "shuffleArray", + value: function shuffleArray(array) { + for (var i = array.length - 1; i > 0; i--) { + var j = Math.floor(Math.random() * (i + 1)); + var _ref = [array[j], array[i]]; + array[i] = _ref[0]; + array[j] = _ref[1]; + } } -}(this, function () { - "use strict"; + }]); + return Configuration; +}(); - // Slightly dubious tricks to cut down minimized file size - var noop = function() {}; - var undefinedType = "undefined"; - var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && ( - /Trident\/|MSIE /.test(window.navigator.userAgent) - ); - var logMethods = [ - "trace", - "debug", - "info", - "warn", - "error" - ]; +/***/ }), - // Cross-browser bind equivalent that works at least back to IE6 - function bindMethod(obj, methodName) { - var method = obj[methodName]; - if (typeof method.bind === 'function') { - return method.bind(obj); - } else { - try { - return Function.prototype.bind.call(method, obj); - } catch (e) { - // Missing bind shim or IE8 + Modernizr, fallback to wrapping - return function() { - return Function.prototype.apply.apply(method, [obj, arguments]); - }; - } - } - } +/***/ "./src/Typesense/Debug.ts": +/*!********************************!*\ + !*** ./src/Typesense/Debug.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - // Trace() doesn't print the message in IE, so for that case we need to wrap it - function traceForIE() { - if (console.log) { - if (console.log.apply) { - console.log.apply(console, arguments); - } else { - // In old IE, native console methods themselves don't have apply(). - Function.prototype.apply.apply(console.log, [console, arguments]); - } - } - if (console.trace) console.trace(); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Debug) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); - // Build the best logging method possible for this env - // Wherever possible we want to bind, not wrap, to preserve stack traces - function realMethod(methodName) { - if (methodName === 'debug') { - methodName = 'log'; - } - if (typeof console === undefinedType) { - return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives - } else if (methodName === 'trace' && isIE) { - return traceForIE; - } else if (console[methodName] !== undefined) { - return bindMethod(console, methodName); - } else if (console.log !== undefined) { - return bindMethod(console, 'log'); - } else { - return noop; - } - } - // These private functions always need `this` to be set properly - function replaceLoggingMethods(level, loggerName) { - /*jshint validthis:true */ - for (var i = 0; i < logMethods.length; i++) { - var methodName = logMethods[i]; - this[methodName] = (i < level) ? - noop : - this.methodFactory(methodName, level, loggerName); - } +var RESOURCEPATH = "/debug"; +var Debug = /*#__PURE__*/function () { + function Debug(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Debug); + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Debug, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(RESOURCEPATH)); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }]); + return Debug; +}(); - // Define log.log as an alias for log.debug - this.log = this.debug; - } - // In old IE versions, the console isn't present until you first open it. - // We build realMethod() replacements here that regenerate logging methods - function enableLoggingWhenConsoleArrives(methodName, level, loggerName) { - return function () { - if (typeof console !== undefinedType) { - replaceLoggingMethods.call(this, level, loggerName); - this[methodName].apply(this, arguments); - } - }; - } +/***/ }), - // By default, we use closely bound real methods wherever possible, and - // otherwise we wait for a console to appear, and then try again. - function defaultMethodFactory(methodName, level, loggerName) { - /*jshint validthis:true */ - return realMethod(methodName) || - enableLoggingWhenConsoleArrives.apply(this, arguments); - } +/***/ "./src/Typesense/Document.ts": +/*!***********************************!*\ + !*** ./src/Typesense/Document.ts ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - function Logger(name, defaultLevel, factory) { - var self = this; - var currentLevel; - defaultLevel = defaultLevel == null ? "WARN" : defaultLevel; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Document: () => (/* binding */ Document) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Collections */ "./src/Typesense/Collections.ts"); +/* harmony import */ var _Documents__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Documents */ "./src/Typesense/Documents.ts"); - var storageKey = "loglevel"; - if (typeof name === "string") { - storageKey += ":" + name; - } else if (typeof name === "symbol") { - storageKey = undefined; - } - function persistLevelIfPossible(levelNum) { - var levelName = (logMethods[levelNum] || 'silent').toUpperCase(); - if (typeof window === undefinedType || !storageKey) return; - // Use localStorage if available - try { - window.localStorage[storageKey] = levelName; - return; - } catch (ignore) {} - // Use session cookie as fallback - try { - window.document.cookie = - encodeURIComponent(storageKey) + "=" + levelName + ";"; - } catch (ignore) {} - } - function getPersistedLevel() { - var storedLevel; +var Document = /*#__PURE__*/function () { + function Document(collectionName, documentId, apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Document); + this.collectionName = collectionName; + this.documentId = documentId; + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Document, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.delete(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function _delete() { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "update", + value: function () { + var _update = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee3(partialDocument) { + var options, + _args3 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {}; + return _context3.abrupt("return", this.apiCall.patch(this.endpointPath(), partialDocument, options)); + case 2: + case "end": + return _context3.stop(); + } + }, _callee3, this); + })); + function update(_x) { + return _update.apply(this, arguments); + } + return update; + }() + }, { + key: "endpointPath", + value: function endpointPath() { + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(_Documents__WEBPACK_IMPORTED_MODULE_5__["default"].RESOURCEPATH, "/").concat(this.documentId); + } + }]); + return Document; +}(); - if (typeof window === undefinedType || !storageKey) return; +/***/ }), - try { - storedLevel = window.localStorage[storageKey]; - } catch (ignore) {} +/***/ "./src/Typesense/Documents.ts": +/*!************************************!*\ + !*** ./src/Typesense/Documents.ts ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - // Fallback to cookies if local storage gives us nothing - if (typeof storedLevel === undefinedType) { - try { - var cookie = window.document.cookie; - var location = cookie.indexOf( - encodeURIComponent(storageKey) + "="); - if (location !== -1) { - storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1]; - } - } catch (ignore) {} - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Documents) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _Errors__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Errors */ "./src/Typesense/Errors/index.ts"); +/* harmony import */ var _SearchOnlyDocuments__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SearchOnlyDocuments */ "./src/Typesense/SearchOnlyDocuments.ts"); - // If the stored level is not valid, treat it as if nothing was stored. - if (self.levels[storedLevel] === undefined) { - storedLevel = undefined; - } - return storedLevel; - } - function clearPersistedLevel() { - if (typeof window === undefinedType || !storageKey) return; - // Use localStorage if available - try { - window.localStorage.removeItem(storageKey); - return; - } catch (ignore) {} - // Use session cookie as fallback - try { - window.document.cookie = - encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; - } catch (ignore) {} - } - /* - * - * Public logger API - see https://github.com/pimterry/loglevel for details - * - */ - self.name = name; +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } - self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3, - "ERROR": 4, "SILENT": 5}; - self.methodFactory = factory || defaultMethodFactory; - self.getLevel = function () { - return currentLevel; - }; +// Todo: use generic to extract filter_by values - self.setLevel = function (level, persist) { - if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) { - level = self.levels[level.toUpperCase()]; +// Todo: we could infer whether this is a grouped response by adding the search params as a generic +var Documents = /*#__PURE__*/function (_ref) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__["default"])(Documents, _ref); + var _super = _createSuper(Documents); + function Documents(collectionName, apiCall, configuration) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Documents); + return _super.call(this, collectionName, apiCall, configuration); + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Documents, [{ + key: "create", + value: function () { + var _create = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function _callee(document) { + var options, + _args = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; + if (document) { + _context.next = 3; + break; + } + throw new Error("No document provided"); + case 3: + return _context.abrupt("return", this.apiCall.post(this.endpointPath(), document, options)); + case 4: + case "end": + return _context.stop(); } - if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) { - currentLevel = level; - if (persist !== false) { // defaults to true - persistLevelIfPossible(level); + }, _callee, this); + })); + function create(_x) { + return _create.apply(this, arguments); + } + return create; + }() + }, { + key: "upsert", + value: function () { + var _upsert = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function _callee2(document) { + var options, + _args2 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {}; + if (document) { + _context2.next = 3; + break; } - replaceLoggingMethods.call(self, level, name); - if (typeof console === undefinedType && level < self.levels.SILENT) { - return "No console available for logging"; + throw new Error("No document provided"); + case 3: + return _context2.abrupt("return", this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { + action: "upsert" + }))); + case 4: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function upsert(_x2) { + return _upsert.apply(this, arguments); + } + return upsert; + }() + }, { + key: "update", + value: function () { + var _update = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function _callee3(document) { + var options, + _args3 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {}; + if (document) { + _context3.next = 3; + break; } - } else { - throw "log.setLevel() called with invalid level: " + level; + throw new Error("No document provided"); + case 3: + if (!(options["filter_by"] != null)) { + _context3.next = 7; + break; + } + return _context3.abrupt("return", this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))); + case 7: + return _context3.abrupt("return", this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { + action: "update" + }))); + case 8: + case "end": + return _context3.stop(); } - }; - - self.setDefaultLevel = function (level) { - defaultLevel = level; - if (!getPersistedLevel()) { - self.setLevel(level, false); + }, _callee3, this); + })); + function update(_x3) { + return _update.apply(this, arguments); + } + return update; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function _callee4() { + var idOrQuery, + _args4 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + idOrQuery = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}; + if (!(typeof idOrQuery === "string")) { + _context4.next = 5; + break; + } + return _context4.abrupt("return", this.apiCall.delete(this.endpointPath(idOrQuery), idOrQuery)); + case 5: + return _context4.abrupt("return", this.apiCall.delete(this.endpointPath(), idOrQuery)); + case 6: + case "end": + return _context4.stop(); } - }; + }, _callee4, this); + })); + function _delete() { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "createMany", + value: function () { + var _createMany = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function _callee5(documents) { + var options, + _args5 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {}; + this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"); + return _context5.abrupt("return", this.import(documents, options)); + case 3: + case "end": + return _context5.stop(); + } + }, _callee5, this); + })); + function createMany(_x4) { + return _createMany.apply(this, arguments); + } + return createMany; + }() + /** + * Import a set of documents in a batch. + * @param {string|Array} documents - Can be a JSONL string of documents or an array of document objects. + * @param options + * @return {string|Array} Returns a JSONL string if the input was a JSONL string, otherwise it returns an array of results. + */ + }, { + key: "import", + value: function () { + var _import2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function _callee6(documents) { + var options, + documentsInJSONLFormat, + resultsInJSONLFormat, + resultsInJSONFormat, + failedItems, + _args6 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {}; + if (!Array.isArray(documents)) { + _context6.next = 13; + break; + } + _context6.prev = 2; + documentsInJSONLFormat = documents.map(function (document) { + return JSON.stringify(document); + }).join("\n"); + _context6.next = 11; + break; + case 6: + _context6.prev = 6; + _context6.t0 = _context6["catch"](2); + if (!(RangeError instanceof _context6.t0 && _context6.t0 !== null && _context6.t0 !== void 0 && _context6.t0.includes("Too many properties to enumerate"))) { + _context6.next = 10; + break; + } + throw new Error("".concat(_context6.t0, "\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n ")); + case 10: + throw new Error(_context6.t0); + case 11: + _context6.next = 14; + break; + case 13: + documentsInJSONLFormat = documents; + case 14: + _context6.next = 16; + return this.apiCall.performRequest("post", this.endpointPath("import"), { + queryParameters: options, + bodyParameters: documentsInJSONLFormat, + additionalHeaders: { + "Content-Type": "text/plain" + }, + skipConnectionTimeout: true // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully + }); + case 16: + resultsInJSONLFormat = _context6.sent; + if (!Array.isArray(documents)) { + _context6.next = 27; + break; + } + resultsInJSONFormat = resultsInJSONLFormat.split("\n").map(function (r) { + return JSON.parse(r); + }); + failedItems = resultsInJSONFormat.filter(function (r) { + return r.success === false; + }); + if (!(failedItems.length > 0)) { + _context6.next = 24; + break; + } + throw new _Errors__WEBPACK_IMPORTED_MODULE_7__.ImportError("".concat(resultsInJSONFormat.length - failedItems.length, " documents imported successfully, ").concat(failedItems.length, " documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."), resultsInJSONFormat); + case 24: + return _context6.abrupt("return", resultsInJSONFormat); + case 25: + _context6.next = 28; + break; + case 27: + return _context6.abrupt("return", resultsInJSONLFormat); + case 28: + case "end": + return _context6.stop(); + } + }, _callee6, this, [[2, 6]]); + })); + function _import(_x5) { + return _import2.apply(this, arguments); + } + return _import; + }() + /** + * Returns a JSONL string for all the documents in this collection + */ + }, { + key: "export", + value: function () { + var _export2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function _callee7() { + var options, + _args7 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + options = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}; + return _context7.abrupt("return", this.apiCall.get(this.endpointPath("export"), options)); + case 2: + case "end": + return _context7.stop(); + } + }, _callee7, this); + })); + function _export() { + return _export2.apply(this, arguments); + } + return _export; + }() + /** + * Returns a NodeJS readable stream of JSONL for all the documents in this collection. + */ + }, { + key: "exportStream", + value: function () { + var _exportStream = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function _callee8() { + var options, + _args8 = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function _callee8$(_context8) { + while (1) switch (_context8.prev = _context8.next) { + case 0: + options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {}; + return _context8.abrupt("return", this.apiCall.get(this.endpointPath("export"), options, { + responseType: "stream" + })); + case 2: + case "end": + return _context8.stop(); + } + }, _callee8, this); + })); + function exportStream() { + return _exportStream.apply(this, arguments); + } + return exportStream; + }() + }]); + return Documents; +}(_SearchOnlyDocuments__WEBPACK_IMPORTED_MODULE_8__.SearchOnlyDocuments); - self.resetLevel = function () { - self.setLevel(defaultLevel, false); - clearPersistedLevel(); - }; - self.enableAll = function(persist) { - self.setLevel(self.levels.TRACE, persist); - }; +/***/ }), - self.disableAll = function(persist) { - self.setLevel(self.levels.SILENT, persist); - }; +/***/ "./src/Typesense/Errors/HTTPError.ts": +/*!*******************************************!*\ + !*** ./src/Typesense/Errors/HTTPError.ts ***! + \*******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - // Initialize with the right level - var initialLevel = getPersistedLevel(); - if (initialLevel == null) { - initialLevel = defaultLevel; - } - self.setLevel(initialLevel, false); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ HTTPError) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); - /* - * - * Top-level API - * - */ - var defaultLogger = new Logger(); - var _loggersByName = {}; - defaultLogger.getLogger = function getLogger(name) { - if ((typeof name !== "symbol" && typeof name !== "string") || name === "") { - throw new TypeError("You must supply a name when creating a logger."); - } - var logger = _loggersByName[name]; - if (!logger) { - logger = _loggersByName[name] = new Logger( - name, defaultLogger.getLevel(), defaultLogger.methodFactory); - } - return logger; - }; - // Grab the current global log variable in case of overwrite - var _log = (typeof window !== undefinedType) ? window.log : undefined; - defaultLogger.noConflict = function() { - if (typeof window !== undefinedType && - window.log === defaultLogger) { - window.log = _log; - } +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } - return defaultLogger; - }; +var HTTPError = /*#__PURE__*/function (_TypesenseError) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(HTTPError, _TypesenseError); + var _super = _createSuper(HTTPError); + function HTTPError() { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, HTTPError); + return _super.apply(this, arguments); + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(HTTPError); +}(_TypesenseError__WEBPACK_IMPORTED_MODULE_5__["default"]); - defaultLogger.getLoggers = function getLoggers() { - return _loggersByName; - }; - // ES6 default export, for compatibility - defaultLogger['default'] = defaultLogger; +/***/ }), - return defaultLogger; -})); +/***/ "./src/Typesense/Errors/ImportError.ts": +/*!*********************************************!*\ + !*** ./src/Typesense/Errors/ImportError.ts ***! + \*********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -},{}],38:[function(require,module,exports){ "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ImportError) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); -var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function get() { - return m[k]; - } - }; - } - Object.defineProperty(o, k2, desc); -} : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); -var __setModuleDefault = void 0 && (void 0).__setModuleDefault || (Object.create ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function (o, v) { - o["default"] = v; -}); -var __importStar = void 0 && (void 0).__importStar || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) { - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +var ImportError = /*#__PURE__*/function (_TypesenseError) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(ImportError, _TypesenseError); + var _super = _createSuper(ImportError); + function ImportError(message, importResults) { + var _this; + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, ImportError); + _this = _super.call(this, message); + _this.importResults = importResults; + return _this; } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(ImportError); +}(_TypesenseError__WEBPACK_IMPORTED_MODULE_5__["default"]); - __setModuleDefault(result, mod); - return result; -}; +/***/ }), -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; +/***/ "./src/Typesense/Errors/MissingConfigurationError.ts": +/*!***********************************************************!*\ + !*** ./src/Typesense/Errors/MissingConfigurationError.ts ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Errors = exports.SearchClient = exports.Client = void 0; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MissingConfigurationError) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); -var Client_1 = __importDefault(require("./Typesense/Client")); -exports.Client = Client_1["default"]; -var SearchClient_1 = __importDefault(require("./Typesense/SearchClient")); -exports.SearchClient = SearchClient_1["default"]; -var Errors = __importStar(require("./Typesense/Errors")); +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } -exports.Errors = Errors; -exports["default"] = { - Client: Client_1["default"], - SearchClient: SearchClient_1["default"], - Errors: Errors -}; +var MissingConfigurationError = /*#__PURE__*/function (_TypesenseError) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(MissingConfigurationError, _TypesenseError); + var _super = _createSuper(MissingConfigurationError); + function MissingConfigurationError() { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, MissingConfigurationError); + return _super.apply(this, arguments); + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(MissingConfigurationError); +}(_TypesenseError__WEBPACK_IMPORTED_MODULE_5__["default"]); -},{"./Typesense/Client":45,"./Typesense/Errors":62,"./Typesense/SearchClient":74}],62:[function(require,module,exports){ -"use strict"; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; +/***/ }), -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0; +/***/ "./src/Typesense/Errors/ObjectAlreadyExists.ts": +/*!*****************************************************!*\ + !*** ./src/Typesense/Errors/ObjectAlreadyExists.ts ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -var HTTPError_1 = __importDefault(require("./HTTPError")); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ObjectAlreadyExists) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); -exports.HTTPError = HTTPError_1["default"]; -var MissingConfigurationError_1 = __importDefault(require("./MissingConfigurationError")); -exports.MissingConfigurationError = MissingConfigurationError_1["default"]; -var ObjectAlreadyExists_1 = __importDefault(require("./ObjectAlreadyExists")); -exports.ObjectAlreadyExists = ObjectAlreadyExists_1["default"]; +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } -var ObjectNotFound_1 = __importDefault(require("./ObjectNotFound")); +var ObjectAlreadyExists = /*#__PURE__*/function (_TypesenseError) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(ObjectAlreadyExists, _TypesenseError); + var _super = _createSuper(ObjectAlreadyExists); + function ObjectAlreadyExists() { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, ObjectAlreadyExists); + return _super.apply(this, arguments); + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(ObjectAlreadyExists); +}(_TypesenseError__WEBPACK_IMPORTED_MODULE_5__["default"]); -exports.ObjectNotFound = ObjectNotFound_1["default"]; -var ObjectUnprocessable_1 = __importDefault(require("./ObjectUnprocessable")); +/***/ }), -exports.ObjectUnprocessable = ObjectUnprocessable_1["default"]; +/***/ "./src/Typesense/Errors/ObjectNotFound.ts": +/*!************************************************!*\ + !*** ./src/Typesense/Errors/ObjectNotFound.ts ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -var RequestMalformed_1 = __importDefault(require("./RequestMalformed")); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ObjectNotFound) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); -exports.RequestMalformed = RequestMalformed_1["default"]; -var RequestUnauthorized_1 = __importDefault(require("./RequestUnauthorized")); -exports.RequestUnauthorized = RequestUnauthorized_1["default"]; -var ServerError_1 = __importDefault(require("./ServerError")); -exports.ServerError = ServerError_1["default"]; +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } -var ImportError_1 = __importDefault(require("./ImportError")); +var ObjectNotFound = /*#__PURE__*/function (_TypesenseError) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(ObjectNotFound, _TypesenseError); + var _super = _createSuper(ObjectNotFound); + function ObjectNotFound() { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, ObjectNotFound); + return _super.apply(this, arguments); + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(ObjectNotFound); +}(_TypesenseError__WEBPACK_IMPORTED_MODULE_5__["default"]); -exports.ImportError = ImportError_1["default"]; -var TypesenseError_1 = __importDefault(require("./TypesenseError")); +/***/ }), -exports.TypesenseError = TypesenseError_1["default"]; +/***/ "./src/Typesense/Errors/ObjectUnprocessable.ts": +/*!*****************************************************!*\ + !*** ./src/Typesense/Errors/ObjectUnprocessable.ts ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -},{"./HTTPError":52,"./ImportError":53,"./MissingConfigurationError":54,"./ObjectAlreadyExists":55,"./ObjectNotFound":56,"./ObjectUnprocessable":57,"./RequestMalformed":58,"./RequestUnauthorized":59,"./ServerError":60,"./TypesenseError":61}],45:[function(require,module,exports){ "use strict"; -/* eslint-disable no-dupe-class-members */ +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ObjectUnprocessable) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var Configuration_1 = __importDefault(require("./Configuration")); -var ApiCall_1 = __importDefault(require("./ApiCall")); -var Collections_1 = __importDefault(require("./Collections")); +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } -var Collection_1 = __importDefault(require("./Collection")); +var ObjectUnprocessable = /*#__PURE__*/function (_TypesenseError) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(ObjectUnprocessable, _TypesenseError); + var _super = _createSuper(ObjectUnprocessable); + function ObjectUnprocessable() { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, ObjectUnprocessable); + return _super.apply(this, arguments); + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(ObjectUnprocessable); +}(_TypesenseError__WEBPACK_IMPORTED_MODULE_5__["default"]); -var Aliases_1 = __importDefault(require("./Aliases")); -var Alias_1 = __importDefault(require("./Alias")); +/***/ }), -var Keys_1 = __importDefault(require("./Keys")); +/***/ "./src/Typesense/Errors/RequestMalformed.ts": +/*!**************************************************!*\ + !*** ./src/Typesense/Errors/RequestMalformed.ts ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -var Key_1 = __importDefault(require("./Key")); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ RequestMalformed) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); -var Debug_1 = __importDefault(require("./Debug")); -var Metrics_1 = __importDefault(require("./Metrics")); -var Health_1 = __importDefault(require("./Health")); -var Operations_1 = __importDefault(require("./Operations")); -var MultiSearch_1 = __importDefault(require("./MultiSearch")); +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } -var Presets_1 = __importDefault(require("./Presets")); +var RequestMalformed = /*#__PURE__*/function (_TypesenseError) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(RequestMalformed, _TypesenseError); + var _super = _createSuper(RequestMalformed); + function RequestMalformed() { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, RequestMalformed); + return _super.apply(this, arguments); + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(RequestMalformed); +}(_TypesenseError__WEBPACK_IMPORTED_MODULE_5__["default"]); -var Preset_1 = __importDefault(require("./Preset")); -var Analytics_1 = __importDefault(require("./Analytics")); +/***/ }), -var Client = -/** @class */ -function () { - function Client(options) { - var _a; - - options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : false; - this.configuration = new Configuration_1["default"](options); - this.apiCall = new ApiCall_1["default"](this.configuration); - this.debug = new Debug_1["default"](this.apiCall); - this.metrics = new Metrics_1["default"](this.apiCall); - this.health = new Health_1["default"](this.apiCall); - this.operations = new Operations_1["default"](this.apiCall); - this.multiSearch = new MultiSearch_1["default"](this.apiCall, this.configuration); - this._collections = new Collections_1["default"](this.apiCall); - this.individualCollections = {}; - this._aliases = new Aliases_1["default"](this.apiCall); - this.individualAliases = {}; - this._keys = new Keys_1["default"](this.apiCall); - this.individualKeys = {}; - this._presets = new Presets_1["default"](this.apiCall); - this.individualPresets = {}; - this.analytics = new Analytics_1["default"](this.apiCall); - } +/***/ "./src/Typesense/Errors/RequestUnauthorized.ts": +/*!*****************************************************!*\ + !*** ./src/Typesense/Errors/RequestUnauthorized.ts ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - Client.prototype.collections = function (collectionName) { - if (collectionName === undefined) { - return this._collections; - } else { - if (this.individualCollections[collectionName] === undefined) { - this.individualCollections[collectionName] = new Collection_1["default"](collectionName, this.apiCall, this.configuration); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ RequestUnauthorized) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); - return this.individualCollections[collectionName]; - } - }; - Client.prototype.aliases = function (aliasName) { - if (aliasName === undefined) { - return this._aliases; - } else { - if (this.individualAliases[aliasName] === undefined) { - this.individualAliases[aliasName] = new Alias_1["default"](aliasName, this.apiCall); - } - return this.individualAliases[aliasName]; - } - }; - Client.prototype.keys = function (id) { - if (id === undefined) { - return this._keys; - } else { - if (this.individualKeys[id] === undefined) { - this.individualKeys[id] = new Key_1["default"](id, this.apiCall); - } - return this.individualKeys[id]; - } - }; +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } - Client.prototype.presets = function (id) { - if (id === undefined) { - return this._presets; - } else { - if (this.individualPresets[id] === undefined) { - this.individualPresets[id] = new Preset_1["default"](id, this.apiCall); - } +var RequestUnauthorized = /*#__PURE__*/function (_TypesenseError) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(RequestUnauthorized, _TypesenseError); + var _super = _createSuper(RequestUnauthorized); + function RequestUnauthorized() { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, RequestUnauthorized); + return _super.apply(this, arguments); + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(RequestUnauthorized); +}(_TypesenseError__WEBPACK_IMPORTED_MODULE_5__["default"]); - return this.individualPresets[id]; - } - }; - return Client; -}(); +/***/ }), -exports["default"] = Client; +/***/ "./src/Typesense/Errors/ServerError.ts": +/*!*********************************************!*\ + !*** ./src/Typesense/Errors/ServerError.ts ***! + \*********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -},{"./Alias":39,"./Aliases":40,"./Analytics":41,"./ApiCall":44,"./Collection":46,"./Collections":47,"./Configuration":48,"./Debug":49,"./Health":63,"./Key":64,"./Keys":65,"./Metrics":66,"./MultiSearch":67,"./Operations":68,"./Preset":71,"./Presets":72}],74:[function(require,module,exports){ "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ServerError) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var Configuration_1 = __importDefault(require("./Configuration")); -var ApiCall_1 = __importDefault(require("./ApiCall")); -var MultiSearch_1 = __importDefault(require("./MultiSearch")); -var SearchOnlyCollection_1 = require("./SearchOnlyCollection"); +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } -var SearchClient = -/** @class */ -function () { - function SearchClient(options) { - var _a; +var ServerError = /*#__PURE__*/function (_TypesenseError) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__["default"])(ServerError, _TypesenseError); + var _super = _createSuper(ServerError); + function ServerError() { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, ServerError); + return _super.apply(this, arguments); + } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(ServerError); +}(_TypesenseError__WEBPACK_IMPORTED_MODULE_5__["default"]); - options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true; - if (options.sendApiKeyAsQueryParam === true && (options.apiKey || "").length > 2000) { - console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."); - options.sendApiKeyAsQueryParam = false; - } +/***/ }), - this.configuration = new Configuration_1["default"](options); - this.apiCall = new ApiCall_1["default"](this.configuration); - this.multiSearch = new MultiSearch_1["default"](this.apiCall, this.configuration, true); - this.individualCollections = {}; - } +/***/ "./src/Typesense/Errors/TypesenseError.ts": +/*!************************************************!*\ + !*** ./src/Typesense/Errors/TypesenseError.ts ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - SearchClient.prototype.clearCache = function () { - this.multiSearch.clearCache(); // eslint-disable-next-line @typescript-eslint/no-unused-vars +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ TypesenseError) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js"); - Object.entries(this.individualCollections).forEach(function (_a) { - var _ = _a[0], - collection = _a[1]; - collection.documents().clearCache(); - }); - }; - SearchClient.prototype.collections = function (collectionName) { - if (!collectionName) { - throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to " + "be searched must be specified. Use Typesense.Client if you need to access the collection object."); - } else { - if (this.individualCollections[collectionName] === undefined) { - this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration); - } - return this.individualCollections[collectionName]; - } - }; - return SearchClient; -}(); -exports["default"] = SearchClient; -},{"./ApiCall":44,"./Configuration":48,"./MultiSearch":67,"./SearchOnlyCollection":75}],39:[function(require,module,exports){ -"use strict"; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, result); }; } +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } +var TypesenseError = /*#__PURE__*/function (_Error) { + (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__["default"])(TypesenseError, _Error); + var _super = _createSuper(TypesenseError); + // Source: https://stackoverflow.com/a/58417721/123545 + function TypesenseError(message) { + var _this; + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, TypesenseError); + _this = _super.call(this, message); + _this.name = (this instanceof TypesenseError ? this.constructor : void 0).name; + Object.setPrototypeOf((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])(_this), (this instanceof TypesenseError ? this.constructor : void 0).prototype); + return _this; } + return (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_0__["default"])(TypesenseError); +}( /*#__PURE__*/(0,_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_6__["default"])(Error)); - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } +/***/ }), + +/***/ "./src/Typesense/Errors/index.ts": +/*!***************************************!*\ + !*** ./src/Typesense/Errors/index.ts ***! + \***************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ HTTPError: () => (/* reexport safe */ _HTTPError__WEBPACK_IMPORTED_MODULE_0__["default"]), +/* harmony export */ ImportError: () => (/* reexport safe */ _ImportError__WEBPACK_IMPORTED_MODULE_8__["default"]), +/* harmony export */ MissingConfigurationError: () => (/* reexport safe */ _MissingConfigurationError__WEBPACK_IMPORTED_MODULE_1__["default"]), +/* harmony export */ ObjectAlreadyExists: () => (/* reexport safe */ _ObjectAlreadyExists__WEBPACK_IMPORTED_MODULE_2__["default"]), +/* harmony export */ ObjectNotFound: () => (/* reexport safe */ _ObjectNotFound__WEBPACK_IMPORTED_MODULE_3__["default"]), +/* harmony export */ ObjectUnprocessable: () => (/* reexport safe */ _ObjectUnprocessable__WEBPACK_IMPORTED_MODULE_4__["default"]), +/* harmony export */ RequestMalformed: () => (/* reexport safe */ _RequestMalformed__WEBPACK_IMPORTED_MODULE_5__["default"]), +/* harmony export */ RequestUnauthorized: () => (/* reexport safe */ _RequestUnauthorized__WEBPACK_IMPORTED_MODULE_6__["default"]), +/* harmony export */ ServerError: () => (/* reexport safe */ _ServerError__WEBPACK_IMPORTED_MODULE_7__["default"]), +/* harmony export */ TypesenseError: () => (/* reexport safe */ _TypesenseError__WEBPACK_IMPORTED_MODULE_9__["default"]) +/* harmony export */ }); +/* harmony import */ var _HTTPError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HTTPError */ "./src/Typesense/Errors/HTTPError.ts"); +/* harmony import */ var _MissingConfigurationError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MissingConfigurationError */ "./src/Typesense/Errors/MissingConfigurationError.ts"); +/* harmony import */ var _ObjectAlreadyExists__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ObjectAlreadyExists */ "./src/Typesense/Errors/ObjectAlreadyExists.ts"); +/* harmony import */ var _ObjectNotFound__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ObjectNotFound */ "./src/Typesense/Errors/ObjectNotFound.ts"); +/* harmony import */ var _ObjectUnprocessable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ObjectUnprocessable */ "./src/Typesense/Errors/ObjectUnprocessable.ts"); +/* harmony import */ var _RequestMalformed__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RequestMalformed */ "./src/Typesense/Errors/RequestMalformed.ts"); +/* harmony import */ var _RequestUnauthorized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./RequestUnauthorized */ "./src/Typesense/Errors/RequestUnauthorized.ts"); +/* harmony import */ var _ServerError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ServerError */ "./src/Typesense/Errors/ServerError.ts"); +/* harmony import */ var _ImportError__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ImportError */ "./src/Typesense/Errors/ImportError.ts"); +/* harmony import */ var _TypesenseError__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TypesenseError */ "./src/Typesense/Errors/TypesenseError.ts"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; +/***/ }), - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } +/***/ "./src/Typesense/Health.ts": +/*!*********************************!*\ + !*** ./src/Typesense/Health.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Health) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } +var RESOURCEPATH = "/health"; +var Health = /*#__PURE__*/function () { + function Health(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Health); + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Health, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(RESOURCEPATH)); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }]); + return Health; +}(); - if (t[2]) _.ops.pop(); - _.trys.pop(); +/***/ }), - continue; - } +/***/ "./src/Typesense/Key.ts": +/*!******************************!*\ + !*** ./src/Typesense/Key.ts ***! + \******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Key) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Keys */ "./src/Typesense/Keys.ts"); - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var Aliases_1 = __importDefault(require("./Aliases")); -var Alias = -/** @class */ -function () { - function Alias(name, apiCall) { - this.name = name; +var Key = /*#__PURE__*/function () { + function Key(id, apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Key); + this.id = id; this.apiCall = apiCall; } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Key, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.delete(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function _delete() { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "endpointPath", + value: function endpointPath() { + return "".concat(_Keys__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.id); + } + }]); + return Key; +}(); - Alias.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Alias.prototype["delete"] = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); - }); - }; +/***/ }), - Alias.prototype.endpointPath = function () { - return "".concat(Aliases_1["default"].RESOURCEPATH, "/").concat(this.name); - }; +/***/ "./src/Typesense/Keys.ts": +/*!*******************************!*\ + !*** ./src/Typesense/Keys.ts ***! + \*******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - return Alias; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Keys) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! crypto */ "?4bf0"); +/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_4__); + + + + + +var RESOURCEPATH = "/keys"; +var Keys = /*#__PURE__*/function () { + function Keys(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Keys); + this.apiCall = apiCall; + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Keys, [{ + key: "create", + value: function () { + var _create = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(params) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.post(Keys.RESOURCEPATH, params)); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function create(_x) { + return _create.apply(this, arguments); + } + return create; + }() + }, { + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.get(RESOURCEPATH)); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "generateScopedSearchKey", + value: function generateScopedSearchKey(searchKey, parameters) { + // Note: only a key generated with the `documents:search` action will be + // accepted by the server, when usined with the search endpoint. + var paramsJSON = JSON.stringify(parameters); + var digest = Buffer.from((0,crypto__WEBPACK_IMPORTED_MODULE_4__.createHmac)("sha256", searchKey).update(paramsJSON).digest("base64")); + var keyPrefix = searchKey.substr(0, 4); + var rawScopedKey = "".concat(digest).concat(keyPrefix).concat(paramsJSON); + return Buffer.from(rawScopedKey).toString("base64"); + } + }], [{ + key: "RESOURCEPATH", + get: function get() { + return RESOURCEPATH; + } + }]); + return Keys; }(); -exports["default"] = Alias; -},{"./Aliases":40}],40:[function(require,module,exports){ +/***/ }), + +/***/ "./src/Typesense/Metrics.ts": +/*!**********************************!*\ + !*** ./src/Typesense/Metrics.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Metrics) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); + + + +var RESOURCEPATH = "/metrics.json"; +var Metrics = /*#__PURE__*/function () { + function Metrics(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Metrics); + this.apiCall = apiCall; } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Metrics, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(RESOURCEPATH)); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }]); + return Metrics; +}(); - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } +/***/ }), - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } +/***/ "./src/Typesense/MultiSearch.ts": +/*!**************************************!*\ + !*** ./src/Typesense/MultiSearch.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MultiSearch) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _RequestWithCache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RequestWithCache */ "./src/Typesense/RequestWithCache.ts"); -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; +var RESOURCEPATH = "/multi_search"; +var MultiSearch = /*#__PURE__*/function () { + function MultiSearch(apiCall, configuration) { + var useTextContentType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, MultiSearch); + this.apiCall = apiCall; + this.configuration = configuration; + this.useTextContentType = useTextContentType; + this.requestWithCache = new _RequestWithCache__WEBPACK_IMPORTED_MODULE_4__["default"](); + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(MultiSearch, [{ + key: "clearCache", + value: function clearCache() { + this.requestWithCache.clearCache(); + } + }, { + key: "perform", + value: function () { + var _perform = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(searchRequests) { + var commonParams, + _ref, + _ref$cacheSearchResul, + cacheSearchResultsForSeconds, + additionalHeaders, + additionalQueryParams, + queryParams, + _args = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + commonParams = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; + _ref = _args.length > 2 && _args[2] !== undefined ? _args[2] : {}, _ref$cacheSearchResul = _ref.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _ref$cacheSearchResul === void 0 ? this.configuration.cacheSearchResultsForSeconds : _ref$cacheSearchResul; + additionalHeaders = {}; + if (this.useTextContentType) { + additionalHeaders["content-type"] = "text/plain"; + } + additionalQueryParams = {}; + if (this.configuration.useServerSideSearchCache === true) { + additionalQueryParams["use_cache"] = true; + } + queryParams = Object.assign({}, commonParams, additionalQueryParams); + return _context.abrupt("return", this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { + cacheResponseForSeconds: cacheSearchResultsForSeconds + })); + case 8: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function perform(_x) { + return _perform.apply(this, arguments); + } + return perform; + }() + }]); + return MultiSearch; +}(); - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +/***/ }), - case 7: - op = _.ops.pop(); +/***/ "./src/Typesense/Operations.ts": +/*!*************************************!*\ + !*** ./src/Typesense/Operations.ts ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - _.trys.pop(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Operations) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } +var RESOURCEPATH = "/operations"; +var Operations = /*#__PURE__*/function () { + function Operations(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Operations); + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Operations, [{ + key: "perform", + value: function () { + var _perform = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(operationName) { + var queryParameters, + _args = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + queryParameters = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; + return _context.abrupt("return", this.apiCall.post("".concat(RESOURCEPATH, "/").concat(operationName), {}, queryParameters)); + case 2: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function perform(_x) { + return _perform.apply(this, arguments); + } + return perform; + }() + }]); + return Operations; +}(); - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); +/***/ }), - break; - } +/***/ "./src/Typesense/Override.ts": +/*!***********************************!*\ + !*** ./src/Typesense/Override.ts ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - if (t[2]) _.ops.pop(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Override) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Collections */ "./src/Typesense/Collections.ts"); +/* harmony import */ var _Overrides__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Overrides */ "./src/Typesense/Overrides.ts"); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var RESOURCEPATH = "/aliases"; -var Aliases = -/** @class */ -function () { - function Aliases(apiCall) { +var Override = /*#__PURE__*/function () { + function Override(collectionName, overrideId, apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Override); + this.collectionName = collectionName; + this.overrideId = overrideId; this.apiCall = apiCall; } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Override, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.delete(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function _delete() { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "endpointPath", + value: function endpointPath() { + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(_Overrides__WEBPACK_IMPORTED_MODULE_5__["default"].RESOURCEPATH, "/").concat(this.overrideId); + } + }]); + return Override; +}(); + + +/***/ }), + +/***/ "./src/Typesense/Overrides.ts": +/*!************************************!*\ + !*** ./src/Typesense/Overrides.ts ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Overrides) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Collections */ "./src/Typesense/Collections.ts"); + - Aliases.prototype.upsert = function (name, mapping) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.put(this.endpointPath(name), mapping)]; - }); - }); - }; - Aliases.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; - Aliases.prototype.endpointPath = function (aliasName) { - return "".concat(Aliases.RESOURCEPATH, "/").concat(aliasName); - }; - Object.defineProperty(Aliases, "RESOURCEPATH", { +var RESOURCEPATH = "/overrides"; +var Overrides = /*#__PURE__*/function () { + function Overrides(collectionName, apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Overrides); + this.collectionName = collectionName; + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Overrides, [{ + key: "upsert", + value: function () { + var _upsert = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(overrideId, params) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.put(this.endpointPath(overrideId), params)); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function upsert(_x, _x2) { + return _upsert.apply(this, arguments); + } + return upsert; + }() + }, { + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "endpointPath", + value: function endpointPath(operation) { + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + } + }], [{ + key: "RESOURCEPATH", get: function get() { return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Aliases; + } + }]); + return Overrides; }(); -exports["default"] = Aliases; -},{}],41:[function(require,module,exports){ -"use strict"; +/***/ }), -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; +/***/ "./src/Typesense/Preset.ts": +/*!*********************************!*\ + !*** ./src/Typesense/Preset.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -Object.defineProperty(exports, "__esModule", { - value: true -}); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Preset) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Presets__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Presets */ "./src/Typesense/Presets.ts"); -var AnalyticsRules_1 = __importDefault(require("./AnalyticsRules")); -var AnalyticsRule_1 = __importDefault(require("./AnalyticsRule")); -var RESOURCEPATH = "/analytics"; -var Analytics = -/** @class */ -function () { - function Analytics(apiCall) { - this.apiCall = apiCall; - this.individualAnalyticsRules = {}; + +var Preset = /*#__PURE__*/function () { + function Preset(presetId, apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Preset); + this.presetId = presetId; this.apiCall = apiCall; - this._analyticsRules = new AnalyticsRules_1["default"](this.apiCall); } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Preset, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.delete(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function _delete() { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "endpointPath", + value: function endpointPath() { + return "".concat(_Presets__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.presetId); + } + }]); + return Preset; +}(); - Analytics.prototype.rules = function (id) { - if (id === undefined) { - return this._analyticsRules; - } else { - if (this.individualAnalyticsRules[id] === undefined) { - this.individualAnalyticsRules[id] = new AnalyticsRule_1["default"](id, this.apiCall); - } - return this.individualAnalyticsRules[id]; - } - }; +/***/ }), + +/***/ "./src/Typesense/Presets.ts": +/*!**********************************!*\ + !*** ./src/Typesense/Presets.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - Object.defineProperty(Analytics, "RESOURCEPATH", { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Presets) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); + + + + +var RESOURCEPATH = "/presets"; +var Presets = /*#__PURE__*/function () { + function Presets(apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Presets); + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Presets, [{ + key: "upsert", + value: function () { + var _upsert = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(presetId, params) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.put(this.endpointPath(presetId), params)); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function upsert(_x, _x2) { + return _upsert.apply(this, arguments); + } + return upsert; + }() + }, { + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "endpointPath", + value: function endpointPath(operation) { + return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + } + }], [{ + key: "RESOURCEPATH", get: function get() { return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Analytics; + } + }]); + return Presets; }(); -exports["default"] = Analytics; -},{"./AnalyticsRule":42,"./AnalyticsRules":43}],43:[function(require,module,exports){ +/***/ }), + +/***/ "./src/Typesense/RequestWithCache.ts": +/*!*******************************************!*\ + !*** ./src/Typesense/RequestWithCache.ts ***! + \*******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ RequestWithCache) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__); -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; +var defaultCacheResponseForSeconds = 2 * 60; +var defaultMaxSize = 100; +var RequestWithCache = /*#__PURE__*/function () { + function RequestWithCache() { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, RequestWithCache); + (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__["default"])(this, "responseCache", new Map()); + (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__["default"])(this, "responsePromiseCache", new Map()); + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(RequestWithCache, [{ + key: "clearCache", + value: function clearCache() { + this.responseCache = new Map(); + this.responsePromiseCache = new Map(); + } + + // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way + }, { + key: "perform", + value: function () { + var _perform = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().mark(function _callee(requestContext, requestFunction, requestFunctionArguments, cacheOptions) { + var _cacheOptions$cacheRe, cacheResponseForSeconds, _cacheOptions$maxSize, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, _isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, _oldestEntry; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _cacheOptions$cacheRe = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _cacheOptions$cacheRe === void 0 ? defaultCacheResponseForSeconds : _cacheOptions$cacheRe, _cacheOptions$maxSize = cacheOptions.maxSize, maxSize = _cacheOptions$maxSize === void 0 ? defaultMaxSize : _cacheOptions$maxSize; + isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0; + if (!isCacheDisabled) { + _context.next = 4; + break; + } + return _context.abrupt("return", requestFunction.call.apply(requestFunction, [requestContext].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(requestFunctionArguments)))); + case 4: + requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments); + cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON); + now = Date.now(); + if (!cacheEntry) { + _context.next = 16; + break; + } + isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000; + if (!isEntryValid) { + _context.next = 15; + break; + } + this.responseCache.delete(requestFunctionArgumentsJSON); + this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry); + return _context.abrupt("return", Promise.resolve(cacheEntry.response)); + case 15: + this.responseCache.delete(requestFunctionArgumentsJSON); + case 16: + cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON); + if (!cachePromiseEntry) { + _context.next = 26; + break; + } + _isEntryValid = now - cachePromiseEntry.requestTimestamp < cacheResponseForSeconds * 1000; + if (!_isEntryValid) { + _context.next = 25; + break; + } + this.responsePromiseCache.delete(requestFunctionArgumentsJSON); + this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry); + return _context.abrupt("return", cachePromiseEntry.responsePromise); + case 25: + this.responsePromiseCache.delete(requestFunctionArgumentsJSON); + case 26: + responsePromise = requestFunction.call.apply(requestFunction, [requestContext].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(requestFunctionArguments))); + this.responsePromiseCache.set(requestFunctionArgumentsJSON, { + requestTimestamp: now, + responsePromise: responsePromise + }); + _context.next = 30; + return responsePromise; + case 30: + response = _context.sent; + this.responseCache.set(requestFunctionArgumentsJSON, { + requestTimestamp: now, + response: response + }); + isCacheOverMaxSize = this.responseCache.size > maxSize; + if (isCacheOverMaxSize) { + oldestEntry = this.responseCache.keys().next().value; + this.responseCache.delete(oldestEntry); + } + isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize; + if (isResponsePromiseCacheOverMaxSize) { + _oldestEntry = this.responsePromiseCache.keys().next().value; + this.responsePromiseCache.delete(_oldestEntry); + } + return _context.abrupt("return", response); + case 37: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function perform(_x, _x2, _x3, _x4) { + return _perform.apply(this, arguments); + } + return perform; + }() + }]); + return RequestWithCache; +}(); - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); +/***/ }), - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; +/***/ "./src/Typesense/SearchClient.ts": +/*!***************************************!*\ + !*** ./src/Typesense/SearchClient.ts ***! + \***************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SearchClient) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _Configuration__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Configuration */ "./src/Typesense/Configuration.ts"); +/* harmony import */ var _ApiCall__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ApiCall */ "./src/Typesense/ApiCall.ts"); +/* harmony import */ var _MultiSearch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MultiSearch */ "./src/Typesense/MultiSearch.ts"); +/* harmony import */ var _SearchOnlyCollection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SearchOnlyCollection */ "./src/Typesense/SearchOnlyCollection.ts"); - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } +var SearchClient = /*#__PURE__*/function () { + function SearchClient(options) { + var _options$sendApiKeyAs; + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, SearchClient); + options.sendApiKeyAsQueryParam = (_options$sendApiKeyAs = options.sendApiKeyAsQueryParam) !== null && _options$sendApiKeyAs !== void 0 ? _options$sendApiKeyAs : true; + if (options.sendApiKeyAsQueryParam === true && (options.apiKey || "").length > 2000) { + console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."); + options.sendApiKeyAsQueryParam = false; + } + this.configuration = new _Configuration__WEBPACK_IMPORTED_MODULE_3__["default"](options); + this.apiCall = new _ApiCall__WEBPACK_IMPORTED_MODULE_4__["default"](this.configuration); + this.multiSearch = new _MultiSearch__WEBPACK_IMPORTED_MODULE_5__["default"](this.apiCall, this.configuration, true); + this.individualCollections = {}; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(SearchClient, [{ + key: "clearCache", + value: function clearCache() { + this.multiSearch.clearCache(); + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + Object.entries(this.individualCollections).forEach(function (_ref) { + var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, 2), + _ = _ref2[0], + collection = _ref2[1]; + collection.documents().clearCache(); + }); + } + }, { + key: "collections", + value: function collections(collectionName) { + if (!collectionName) { + throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to " + "be searched must be specified. Use Typesense.Client if you need to access the collection object."); + } else { + if (this.individualCollections[collectionName] === undefined) { + this.individualCollections[collectionName] = new _SearchOnlyCollection__WEBPACK_IMPORTED_MODULE_6__.SearchOnlyCollection(collectionName, this.apiCall, this.configuration); + } + return this.individualCollections[collectionName]; + } + } + }]); + return SearchClient; +}(); + + +/***/ }), + +/***/ "./src/Typesense/SearchOnlyCollection.ts": +/*!***********************************************!*\ + !*** ./src/Typesense/SearchOnlyCollection.ts ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SearchOnlyCollection: () => (/* binding */ SearchOnlyCollection) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _SearchOnlyDocuments__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SearchOnlyDocuments */ "./src/Typesense/SearchOnlyDocuments.ts"); + - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } +var SearchOnlyCollection = /*#__PURE__*/function () { + function SearchOnlyCollection(name, apiCall, configuration) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, SearchOnlyCollection); + this.name = name; + this.apiCall = apiCall; + this.configuration = configuration; + this._documents = new _SearchOnlyDocuments__WEBPACK_IMPORTED_MODULE_2__.SearchOnlyDocuments(this.name, this.apiCall, this.configuration); + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(SearchOnlyCollection, [{ + key: "documents", + value: function documents() { + return this._documents; + } + }]); + return SearchOnlyCollection; +}(); - if (t && _.label < t[2]) { - _.label = t[2]; +/***/ }), - _.ops.push(op); +/***/ "./src/Typesense/SearchOnlyDocuments.ts": +/*!**********************************************!*\ + !*** ./src/Typesense/SearchOnlyDocuments.ts ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - break; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SearchOnlyDocuments: () => (/* binding */ SearchOnlyDocuments) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _RequestWithCache__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RequestWithCache */ "./src/Typesense/RequestWithCache.ts"); +/* harmony import */ var _Collections__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Collections */ "./src/Typesense/Collections.ts"); - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var RESOURCEPATH = "/analytics/rules"; -var AnalyticsRules = -/** @class */ -function () { - function AnalyticsRules(apiCall) { - this.apiCall = apiCall; +var RESOURCEPATH = "/documents"; +var SearchOnlyDocuments = /*#__PURE__*/function () { + function SearchOnlyDocuments(collectionName, apiCall, configuration) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, SearchOnlyDocuments); + (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__["default"])(this, "requestWithCache", new _RequestWithCache__WEBPACK_IMPORTED_MODULE_5__["default"]()); + this.collectionName = collectionName; this.apiCall = apiCall; + this.configuration = configuration; } - - AnalyticsRules.prototype.upsert = function (name, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.put(this.endpointPath(name), params)]; - }); - }); - }; - - AnalyticsRules.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; - - AnalyticsRules.prototype.endpointPath = function (operation) { - return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); - }; - - Object.defineProperty(AnalyticsRules, "RESOURCEPATH", { + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(SearchOnlyDocuments, [{ + key: "clearCache", + value: function clearCache() { + this.requestWithCache.clearCache(); + } + }, { + key: "search", + value: function () { + var _search = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee(searchParameters) { + var _ref, + _ref$cacheSearchResul, + cacheSearchResultsForSeconds, + _ref$abortSignal, + abortSignal, + additionalQueryParams, + key, + queryParams, + _args = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _ref = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref$cacheSearchResul = _ref.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _ref$cacheSearchResul === void 0 ? this.configuration.cacheSearchResultsForSeconds : _ref$cacheSearchResul, _ref$abortSignal = _ref.abortSignal, abortSignal = _ref$abortSignal === void 0 ? null : _ref$abortSignal; + additionalQueryParams = {}; + if (this.configuration.useServerSideSearchCache === true) { + additionalQueryParams["use_cache"] = true; + } + for (key in searchParameters) { + if (Array.isArray(searchParameters[key])) { + additionalQueryParams[key] = searchParameters[key].join(","); + } + } + queryParams = Object.assign({}, searchParameters, additionalQueryParams); + return _context.abrupt("return", this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath("search"), queryParams, { + abortSignal: abortSignal + }], { + cacheResponseForSeconds: cacheSearchResultsForSeconds + })); + case 6: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function search(_x) { + return _search.apply(this, arguments); + } + return search; + }() + }, { + key: "endpointPath", + value: function endpointPath(operation) { + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_6__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + } + }], [{ + key: "RESOURCEPATH", get: function get() { return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return AnalyticsRules; + } + }]); + return SearchOnlyDocuments; }(); -exports["default"] = AnalyticsRules; +/***/ }), -},{}],42:[function(require,module,exports){ -"use strict"; +/***/ "./src/Typesense/Synonym.ts": +/*!**********************************!*\ + !*** ./src/Typesense/Synonym.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Synonym) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Collections */ "./src/Typesense/Collections.ts"); +/* harmony import */ var _Synonyms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Synonyms */ "./src/Typesense/Synonyms.ts"); - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; +var Synonym = /*#__PURE__*/function () { + function Synonym(collectionName, synonymId, apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Synonym); + this.collectionName = collectionName; + this.synonymId = synonymId; + this.apiCall = apiCall; } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Synonym, [{ + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "delete", + value: function () { + var _delete2 = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.delete(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function _delete() { + return _delete2.apply(this, arguments); + } + return _delete; + }() + }, { + key: "endpointPath", + value: function endpointPath() { + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(_Synonyms__WEBPACK_IMPORTED_MODULE_5__["default"].RESOURCEPATH, "/").concat(this.synonymId); + } + }]); + return Synonym; +}(); - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; +/***/ }), - case 4: - _.label++; - return { - value: op[1], - done: false - }; +/***/ "./src/Typesense/Synonyms.ts": +/*!***********************************!*\ + !*** ./src/Typesense/Synonyms.ts ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Synonyms) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Collections */ "./src/Typesense/Collections.ts"); - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +var RESOURCEPATH = "/synonyms"; +var Synonyms = /*#__PURE__*/function () { + function Synonyms(collectionName, apiCall) { + (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Synonyms); + this.collectionName = collectionName; + this.apiCall = apiCall; + } + (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Synonyms, [{ + key: "upsert", + value: function () { + var _upsert = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee(synonymId, params) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.apiCall.put(this.endpointPath(synonymId), params)); + case 1: + case "end": + return _context.stop(); + } + }, _callee, this); + })); + function upsert(_x, _x2) { + return _upsert.apply(this, arguments); + } + return upsert; + }() + }, { + key: "retrieve", + value: function () { + var _retrieve = (0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3___default().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", this.apiCall.get(this.endpointPath())); + case 1: + case "end": + return _context2.stop(); + } + }, _callee2, this); + })); + function retrieve() { + return _retrieve.apply(this, arguments); + } + return retrieve; + }() + }, { + key: "endpointPath", + value: function endpointPath(operation) { + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + } + }], [{ + key: "RESOURCEPATH", + get: function get() { + return RESOURCEPATH; + } + }]); + return Synonyms; +}(); - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; +/***/ }), - _.ops.push(op); +/***/ "./node_modules/loglevel/lib/loglevel.js": +/*!***********************************************!*\ + !*** ./node_modules/loglevel/lib/loglevel.js ***! + \***********************************************/ +/***/ (function(module, exports, __webpack_require__) { - break; - } +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* +* loglevel - https://github.com/pimterry/loglevel +* +* Copyright (c) 2013 Tim Perry +* Licensed under the MIT license. +*/ +(function (root, definition) { + "use strict"; + if (true) { + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}(this, function () { + "use strict"; - if (t[2]) _.ops.pop(); + // Slightly dubious tricks to cut down minimized file size + var noop = function() {}; + var undefinedType = "undefined"; + var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && ( + /Trident\/|MSIE /.test(window.navigator.userAgent) + ); - _.trys.pop(); + var logMethods = [ + "trace", + "debug", + "info", + "warn", + "error" + ]; - continue; + // Cross-browser bind equivalent that works at least back to IE6 + function bindMethod(obj, methodName) { + var method = obj[methodName]; + if (typeof method.bind === 'function') { + return method.bind(obj); + } else { + try { + return Function.prototype.bind.call(method, obj); + } catch (e) { + // Missing bind shim or IE8 + Modernizr, fallback to wrapping + return function() { + return Function.prototype.apply.apply(method, [obj, arguments]); + }; + } } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; + // Trace() doesn't print the message in IE, so for that case we need to wrap it + function traceForIE() { + if (console.log) { + if (console.log.apply) { + console.log.apply(console, arguments); + } else { + // In old IE, native console methods themselves don't have apply(). + Function.prototype.apply.apply(console.log, [console, arguments]); + } + } + if (console.trace) console.trace(); + } -Object.defineProperty(exports, "__esModule", { - value: true -}); + // Build the best logging method possible for this env + // Wherever possible we want to bind, not wrap, to preserve stack traces + function realMethod(methodName) { + if (methodName === 'debug') { + methodName = 'log'; + } -var AnalyticsRules_1 = __importDefault(require("./AnalyticsRules")); + if (typeof console === undefinedType) { + return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives + } else if (methodName === 'trace' && isIE) { + return traceForIE; + } else if (console[methodName] !== undefined) { + return bindMethod(console, methodName); + } else if (console.log !== undefined) { + return bindMethod(console, 'log'); + } else { + return noop; + } + } -var AnalyticsRule = -/** @class */ -function () { - function AnalyticsRule(name, apiCall) { - this.name = name; - this.apiCall = apiCall; - } + // These private functions always need `this` to be set properly - AnalyticsRule.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; + function replaceLoggingMethods(level, loggerName) { + /*jshint validthis:true */ + for (var i = 0; i < logMethods.length; i++) { + var methodName = logMethods[i]; + this[methodName] = (i < level) ? + noop : + this.methodFactory(methodName, level, loggerName); + } - AnalyticsRule.prototype["delete"] = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); - }); - }; + // Define log.log as an alias for log.debug + this.log = this.debug; + } - AnalyticsRule.prototype.endpointPath = function () { - return "".concat(AnalyticsRules_1["default"].RESOURCEPATH, "/").concat(this.name); - }; + // In old IE versions, the console isn't present until you first open it. + // We build realMethod() replacements here that regenerate logging methods + function enableLoggingWhenConsoleArrives(methodName, level, loggerName) { + return function () { + if (typeof console !== undefinedType) { + replaceLoggingMethods.call(this, level, loggerName); + this[methodName].apply(this, arguments); + } + }; + } - return AnalyticsRule; -}(); + // By default, we use closely bound real methods wherever possible, and + // otherwise we wait for a console to appear, and then try again. + function defaultMethodFactory(methodName, level, loggerName) { + /*jshint validthis:true */ + return realMethod(methodName) || + enableLoggingWhenConsoleArrives.apply(this, arguments); + } -exports["default"] = AnalyticsRule; + function Logger(name, defaultLevel, factory) { + var self = this; + var currentLevel; + defaultLevel = defaultLevel == null ? "WARN" : defaultLevel; -},{"./AnalyticsRules":43}],44:[function(require,module,exports){ -"use strict"; + var storageKey = "loglevel"; + if (typeof name === "string") { + storageKey += ":" + name; + } else if (typeof name === "symbol") { + storageKey = undefined; + } -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + function persistLevelIfPossible(levelNum) { + var levelName = (logMethods[levelNum] || 'silent').toUpperCase(); -var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); + if (typeof window === undefinedType || !storageKey) return; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } + // Use localStorage if available + try { + window.localStorage[storageKey] = levelName; + return; + } catch (ignore) {} - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + // Use session cookie as fallback + try { + window.document.cookie = + encodeURIComponent(storageKey) + "=" + levelName + ";"; + } catch (ignore) {} } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } + function getPersistedLevel() { + var storedLevel; - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } + if (typeof window === undefinedType || !storageKey) return; - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + try { + storedLevel = window.localStorage[storageKey]; + } catch (ignore) {} -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + // Fallback to cookies if local storage gives us nothing + if (typeof storedLevel === undefinedType) { + try { + var cookie = window.document.cookie; + var location = cookie.indexOf( + encodeURIComponent(storageKey) + "="); + if (location !== -1) { + storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1]; + } + } catch (ignore) {} + } - function verb(n) { - return function (v) { - return step([n, v]); - }; - } + // If the stored level is not valid, treat it as if nothing was stored. + if (self.levels[storedLevel] === undefined) { + storedLevel = undefined; + } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); + return storedLevel; + } - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; + function clearPersistedLevel() { + if (typeof window === undefinedType || !storageKey) return; - switch (op[0]) { - case 0: - case 1: - t = op; - break; + // Use localStorage if available + try { + window.localStorage.removeItem(storageKey); + return; + } catch (ignore) {} - case 4: - _.label++; - return { - value: op[1], - done: false - }; + // Use session cookie as fallback + try { + window.document.cookie = + encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; + } catch (ignore) {} + } - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + /* + * + * Public logger API - see https://github.com/pimterry/loglevel for details + * + */ - case 7: - op = _.ops.pop(); + self.name = name; - _.trys.pop(); + self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3, + "ERROR": 4, "SILENT": 5}; - continue; + self.methodFactory = factory || defaultMethodFactory; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + self.getLevel = function () { + return currentLevel; + }; - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + self.setLevel = function (level, persist) { + if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) { + level = self.levels[level.toUpperCase()]; + } + if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) { + currentLevel = level; + if (persist !== false) { // defaults to true + persistLevelIfPossible(level); + } + replaceLoggingMethods.call(self, level, name); + if (typeof console === undefinedType && level < self.levels.SILENT) { + return "No console available for logging"; + } + } else { + throw "log.setLevel() called with invalid level: " + level; + } + }; - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + self.setDefaultLevel = function (level) { + defaultLevel = level; + if (!getPersistedLevel()) { + self.setLevel(level, false); + } + }; - if (t && _.label < t[2]) { - _.label = t[2]; + self.resetLevel = function () { + self.setLevel(defaultLevel, false); + clearPersistedLevel(); + }; - _.ops.push(op); + self.enableAll = function(persist) { + self.setLevel(self.levels.TRACE, persist); + }; - break; - } + self.disableAll = function(persist) { + self.setLevel(self.levels.SILENT, persist); + }; - if (t[2]) _.ops.pop(); + // Initialize with the right level + var initialLevel = getPersistedLevel(); + if (initialLevel == null) { + initialLevel = defaultLevel; + } + self.setLevel(initialLevel, false); + } - _.trys.pop(); + /* + * + * Top-level API + * + */ - continue; - } + var defaultLogger = new Logger(); - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } + var _loggersByName = {}; + defaultLogger.getLogger = function getLogger(name) { + if ((typeof name !== "symbol" && typeof name !== "string") || name === "") { + throw new TypeError("You must supply a name when creating a logger."); + } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true + var logger = _loggersByName[name]; + if (!logger) { + logger = _loggersByName[name] = new Logger( + name, defaultLogger.getLevel(), defaultLogger.methodFactory); + } + return logger; }; - } -}; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; - -Object.defineProperty(exports, "__esModule", { - value: true -}); + // Grab the current global log variable in case of overwrite + var _log = (typeof window !== undefinedType) ? window.log : undefined; + defaultLogger.noConflict = function() { + if (typeof window !== undefinedType && + window.log === defaultLogger) { + window.log = _log; + } -var axios_1 = __importDefault(require("axios")); + return defaultLogger; + }; -var Errors_1 = require("./Errors"); + defaultLogger.getLoggers = function getLoggers() { + return _loggersByName; + }; -var TypesenseError_1 = __importDefault(require("./Errors/TypesenseError")); + // ES6 default export, for compatibility + defaultLogger['default'] = defaultLogger; -var APIKEYHEADERNAME = "X-TYPESENSE-API-KEY"; -var HEALTHY = true; -var UNHEALTHY = false; + return defaultLogger; +})); -var ApiCall = -/** @class */ -function () { - function ApiCall(configuration) { - this.configuration = configuration; - this.apiKey = this.configuration.apiKey; - this.nodes = this.configuration.nodes == null ? this.configuration.nodes : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes - this.nearestNode = this.configuration.nearestNode == null ? this.configuration.nearestNode : JSON.parse(JSON.stringify(this.configuration.nearestNode)); - this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds; - this.healthcheckIntervalSeconds = this.configuration.healthcheckIntervalSeconds; - this.numRetriesPerRequest = this.configuration.numRetries; - this.retryIntervalSeconds = this.configuration.retryIntervalSeconds; - this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam; - this.additionalUserHeaders = this.configuration.additionalHeaders; - this.logger = this.configuration.logger; - this.initializeMetadataForNodes(); - this.currentNodeIndex = -1; +/***/ }), + +/***/ "?4bf0": +/*!************************!*\ + !*** crypto (ignored) ***! + \************************/ +/***/ (() => { + +/* (ignored) */ + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/regeneratorRuntime.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! + \*******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var _typeof = (__webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/typeof.js")["default"]); +function _regeneratorRuntime() { + "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { + return e; + }, module.exports.__esModule = true, module.exports["default"] = module.exports; + var t, + e = {}, + r = Object.prototype, + n = r.hasOwnProperty, + o = Object.defineProperty || function (t, e, r) { + t[e] = r.value; + }, + i = "function" == typeof Symbol ? Symbol : {}, + a = i.iterator || "@@iterator", + c = i.asyncIterator || "@@asyncIterator", + u = i.toStringTag || "@@toStringTag"; + function define(t, e, r) { + return Object.defineProperty(t, e, { + value: r, + enumerable: !0, + configurable: !0, + writable: !0 + }), t[e]; } - - ApiCall.prototype.get = function (endpoint, queryParameters, _a) { - if (queryParameters === void 0) { - queryParameters = {}; + try { + define({}, ""); + } catch (t) { + define = function define(t, e, r) { + return t[e] = r; + }; + } + function wrap(t, e, r, n) { + var i = e && e.prototype instanceof Generator ? e : Generator, + a = Object.create(i.prototype), + c = new Context(n || []); + return o(a, "_invoke", { + value: makeInvokeMethod(t, r, c) + }), a; + } + function tryCatch(t, e, r) { + try { + return { + type: "normal", + arg: t.call(e, r) + }; + } catch (t) { + return { + type: "throw", + arg: t + }; } - - var _b = _a === void 0 ? {} : _a, - _c = _b.abortSignal, - abortSignal = _c === void 0 ? null : _c, - _d = _b.responseType, - responseType = _d === void 0 ? undefined : _d; - - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_e) { - return [2 - /*return*/ - , this.performRequest("get", endpoint, { - queryParameters: queryParameters, - abortSignal: abortSignal, - responseType: responseType - })]; + } + e.wrap = wrap; + var h = "suspendedStart", + l = "suspendedYield", + f = "executing", + s = "completed", + y = {}; + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + var p = {}; + define(p, a, function () { + return this; + }); + var d = Object.getPrototypeOf, + v = d && d(d(values([]))); + v && v !== r && n.call(v, a) && (p = v); + var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); + function defineIteratorMethods(t) { + ["next", "throw", "return"].forEach(function (e) { + define(t, e, function (t) { + return this._invoke(e, t); }); }); - }; - - ApiCall.prototype["delete"] = function (endpoint, queryParameters) { - if (queryParameters === void 0) { - queryParameters = {}; - } - - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.performRequest("delete", endpoint, { - queryParameters: queryParameters - })]; - }); + } + function AsyncIterator(t, e) { + function invoke(r, o, i, a) { + var c = tryCatch(t[r], t, o); + if ("throw" !== c.type) { + var u = c.arg, + h = u.value; + return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { + invoke("next", t, i, a); + }, function (t) { + invoke("throw", t, i, a); + }) : e.resolve(h).then(function (t) { + u.value = t, i(u); + }, function (t) { + return invoke("throw", t, i, a); + }); + } + a(c.arg); + } + var r; + o(this, "_invoke", { + value: function value(t, n) { + function callInvokeWithMethodAndArg() { + return new e(function (e, r) { + invoke(t, n, e, r); + }); + } + return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + } }); - }; - - ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) { - if (bodyParameters === void 0) { - bodyParameters = {}; - } - - if (queryParameters === void 0) { - queryParameters = {}; - } - - if (additionalHeaders === void 0) { - additionalHeaders = {}; - } - - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.performRequest("post", endpoint, { - queryParameters: queryParameters, - bodyParameters: bodyParameters, - additionalHeaders: additionalHeaders - })]; - }); + } + function makeInvokeMethod(e, r, n) { + var o = h; + return function (i, a) { + if (o === f) throw new Error("Generator is already running"); + if (o === s) { + if ("throw" === i) throw a; + return { + value: t, + done: !0 + }; + } + for (n.method = i, n.arg = a;;) { + var c = n.delegate; + if (c) { + var u = maybeInvokeDelegate(c, n); + if (u) { + if (u === y) continue; + return u; + } + } + if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { + if (o === h) throw o = s, n.arg; + n.dispatchException(n.arg); + } else "return" === n.method && n.abrupt("return", n.arg); + o = f; + var p = tryCatch(e, r, n); + if ("normal" === p.type) { + if (o = n.done ? s : l, p.arg === y) continue; + return { + value: p.arg, + done: n.done + }; + } + "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); + } + }; + } + function maybeInvokeDelegate(e, r) { + var n = r.method, + o = e.iterator[n]; + if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; + var i = tryCatch(o, e.iterator, r.arg); + if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; + var a = i.arg; + return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); + } + function pushTryEntry(t) { + var e = { + tryLoc: t[0] + }; + 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); + } + function resetTryEntry(t) { + var e = t.completion || {}; + e.type = "normal", delete e.arg, t.completion = e; + } + function Context(t) { + this.tryEntries = [{ + tryLoc: "root" + }], t.forEach(pushTryEntry, this), this.reset(!0); + } + function values(e) { + if (e || "" === e) { + var r = e[a]; + if (r) return r.call(e); + if ("function" == typeof e.next) return e; + if (!isNaN(e.length)) { + var o = -1, + i = function next() { + for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; + return next.value = t, next.done = !0, next; + }; + return i.next = i; + } + } + throw new TypeError(_typeof(e) + " is not iterable"); + } + return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { + value: GeneratorFunctionPrototype, + configurable: !0 + }), o(GeneratorFunctionPrototype, "constructor", { + value: GeneratorFunction, + configurable: !0 + }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { + var e = "function" == typeof t && t.constructor; + return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); + }, e.mark = function (t) { + return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; + }, e.awrap = function (t) { + return { + __await: t + }; + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { + return this; + }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { + void 0 === i && (i = Promise); + var a = new AsyncIterator(wrap(t, r, n, o), i); + return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { + return t.done ? t.value : a.next(); }); - }; - - ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) { - if (bodyParameters === void 0) { - bodyParameters = {}; - } - - if (queryParameters === void 0) { - queryParameters = {}; + }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { + return this; + }), define(g, "toString", function () { + return "[object Generator]"; + }), e.keys = function (t) { + var e = Object(t), + r = []; + for (var n in e) r.push(n); + return r.reverse(), function next() { + for (; r.length;) { + var t = r.pop(); + if (t in e) return next.value = t, next.done = !1, next; + } + return next.done = !0, next; + }; + }, e.values = values, Context.prototype = { + constructor: Context, + reset: function reset(e) { + if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); + }, + stop: function stop() { + this.done = !0; + var t = this.tryEntries[0].completion; + if ("throw" === t.type) throw t.arg; + return this.rval; + }, + dispatchException: function dispatchException(e) { + if (this.done) throw e; + var r = this; + function handle(n, o) { + return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; + } + for (var o = this.tryEntries.length - 1; o >= 0; --o) { + var i = this.tryEntries[o], + a = i.completion; + if ("root" === i.tryLoc) return handle("end"); + if (i.tryLoc <= this.prev) { + var c = n.call(i, "catchLoc"), + u = n.call(i, "finallyLoc"); + if (c && u) { + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); + } else if (c) { + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); + } else { + if (!u) throw new Error("try statement without catch or finally"); + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); + } + } + } + }, + abrupt: function abrupt(t, e) { + for (var r = this.tryEntries.length - 1; r >= 0; --r) { + var o = this.tryEntries[r]; + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { + var i = o; + break; + } + } + i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); + var a = i ? i.completion : {}; + return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); + }, + complete: function complete(t, e) { + if ("throw" === t.type) throw t.arg; + return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; + }, + finish: function finish(t) { + for (var e = this.tryEntries.length - 1; e >= 0; --e) { + var r = this.tryEntries[e]; + if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; + } + }, + "catch": function _catch(t) { + for (var e = this.tryEntries.length - 1; e >= 0; --e) { + var r = this.tryEntries[e]; + if (r.tryLoc === t) { + var n = r.completion; + if ("throw" === n.type) { + var o = n.arg; + resetTryEntry(r); + } + return o; + } + } + throw new Error("illegal catch attempt"); + }, + delegateYield: function delegateYield(e, r, n) { + return this.delegate = { + iterator: values(e), + resultName: r, + nextLoc: n + }, "next" === this.method && (this.arg = t), y; } + }, e; +} +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.performRequest("put", endpoint, { - queryParameters: queryParameters, - bodyParameters: bodyParameters - })]; - }); - }); - }; +/***/ }), - ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) { - if (bodyParameters === void 0) { - bodyParameters = {}; - } +/***/ "./node_modules/@babel/runtime/helpers/typeof.js": +/*!*******************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/typeof.js ***! + \*******************************************************/ +/***/ ((module) => { - if (queryParameters === void 0) { - queryParameters = {}; - } +function _typeof(o) { + "@babel/helpers - typeof"; - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.performRequest("patch", endpoint, { - queryParameters: queryParameters, - bodyParameters: bodyParameters - })]; - }); - }); - }; + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); +} +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; - ApiCall.prototype.performRequest = function (requestType, endpoint, _a) { - var _b, _c, _d; - - var _e = _a.queryParameters, - queryParameters = _e === void 0 ? null : _e, - _f = _a.bodyParameters, - bodyParameters = _f === void 0 ? null : _f, - _g = _a.additionalHeaders, - additionalHeaders = _g === void 0 ? {} : _g, - _h = _a.abortSignal, - abortSignal = _h === void 0 ? null : _h, - _j = _a.responseType, - responseType = _j === void 0 ? undefined : _j, - _k = _a.skipConnectionTimeout, - skipConnectionTimeout = _k === void 0 ? false : _k; - return __awaiter(this, void 0, void 0, function () { - var requestNumber, lastException, _loop_1, this_1, numTries, state_1; - - return __generator(this, function (_l) { - switch (_l.label) { - case 0: - this.configuration.validate(); - requestNumber = Date.now(); - this.logger.debug("Request #".concat(requestNumber, ": Performing ").concat(requestType.toUpperCase(), " request: ").concat(endpoint)); - - _loop_1 = function _loop_1(numTries) { - var node, abortListener, requestOptions, cancelToken, source_1, response, error_1; - return __generator(this, function (_m) { - switch (_m.label) { - case 0: - node = this_1.getNextNode(requestNumber); - this_1.logger.debug("Request #".concat(requestNumber, ": Attempting ").concat(requestType.toUpperCase(), " request Try #").concat(numTries, " to Node ").concat(node.index)); - - if (abortSignal && abortSignal.aborted) { - return [2 - /*return*/ - , { - value: Promise.reject(new Error("Request aborted by caller.")) - }]; - } - - abortListener = void 0; - _m.label = 1; - - case 1: - _m.trys.push([1, 3, 5, 6]); - - requestOptions = { - method: requestType, - url: this_1.uriFor(endpoint, node), - headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders), - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: responseType, - validateStatus: function validateStatus(status) { - /* Override default validateStatus, which only considers 2xx a success. - In our case, if the server returns any HTTP code, we will handle it below. - We do this to be able to raise custom errors based on response code. - */ - return status > 0; - }, - transformResponse: [function (data, headers) { - var transformedData = data; - - if (headers !== undefined && typeof data === "string" && headers["content-type"] && headers["content-type"].startsWith("application/json")) { - transformedData = JSON.parse(data); - } - - return transformedData; - }] - }; - - if (skipConnectionTimeout !== true) { - requestOptions.timeout = this_1.connectionTimeoutSeconds * 1000; - } - - if (queryParameters && Object.keys(queryParameters).length !== 0) { - requestOptions.params = queryParameters; - } - - if (this_1.sendApiKeyAsQueryParam) { - requestOptions.params = requestOptions.params || {}; - requestOptions.params["x-typesense-api-key"] = this_1.apiKey; - } - - if (bodyParameters && (typeof bodyParameters === "string" && bodyParameters.length !== 0 || (0, _typeof2["default"])(bodyParameters) === "object" && Object.keys(bodyParameters).length !== 0)) { - requestOptions.data = bodyParameters; - } // Translate from user-provided AbortController to the Axios request cancel mechanism. - - - if (abortSignal) { - cancelToken = axios_1["default"].CancelToken; - source_1 = cancelToken.source(); - - abortListener = function abortListener() { - return source_1.cancel(); - }; +/***/ }), - abortSignal.addEventListener("abort", abortListener); - requestOptions.cancelToken = source_1.token; - } - - return [4 - /*yield*/ - , (0, axios_1["default"])(requestOptions)]; - - case 2: - response = _m.sent(); - - if (response.status >= 1 && response.status <= 499) { - // Treat any status code > 0 and < 500 to be an indication that node is healthy - // We exclude 0 since some clients return 0 when request fails - this_1.setNodeHealthcheck(node, HEALTHY); - } - - this_1.logger.debug("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " was made. Response Code was ").concat(response.status, ".")); - - if (response.status >= 200 && response.status < 300) { - return [2 - /*return*/ - , { - value: Promise.resolve(response.data) - }]; - } else if (response.status < 500) { - return [2 - /*return*/ - , { - value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) - }]; - } else { - // Retry all other HTTP errors (HTTPStatus > 500) - // This will get caught by the catch block below - throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message); - } - - return [3 - /*break*/ - , 6]; - - case 3: - error_1 = _m.sent(); // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts - - this_1.setNodeHealthcheck(node, UNHEALTHY); - lastException = error_1; - this_1.logger.warn("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " failed due to \"").concat(error_1.code, " ").concat(error_1.message).concat(error_1.response == null ? "" : " - " + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), "\"")); // this.logger.debug(error.stack) - - this_1.logger.warn("Request #".concat(requestNumber, ": Sleeping for ").concat(this_1.retryIntervalSeconds, "s and then retrying request...")); - return [4 - /*yield*/ - , this_1.timer(this_1.retryIntervalSeconds)]; - - case 4: - _m.sent(); - - return [3 - /*break*/ - , 6]; - - case 5: - if (abortSignal && abortListener) { - abortSignal.removeEventListener("abort", abortListener); - } - - return [7 - /*endfinally*/ - ]; - - case 6: - return [2 - /*return*/ - ]; - } - }); - }; - - this_1 = this; - numTries = 1; - _l.label = 1; - - case 1: - if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 - /*break*/ - , 4]; - return [5 - /*yield**/ - , _loop_1(numTries)]; - - case 2: - state_1 = _l.sent(); - if ((0, _typeof2["default"])(state_1) === "object") return [2 - /*return*/ - , state_1.value]; - _l.label = 3; - - case 3: - numTries++; - return [3 - /*break*/ - , 1]; - - case 4: - this.logger.debug("Request #".concat(requestNumber, ": No retries left. Raising last error")); - return [2 - /*return*/ - , Promise.reject(lastException)]; - } - }); - }); - }; // Attempts to find the next healthy node, looping through the list of nodes once. - // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy - // so we can try the request for good measure, in case that node has become healthy since +/***/ "./node_modules/@babel/runtime/regenerator/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/@babel/runtime/regenerator/index.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { +// TODO(Babel 8): Remove this file. - ApiCall.prototype.getNextNode = function (requestNumber) { - if (requestNumber === void 0) { - requestNumber = 0; - } // Check if nearestNode is set and is healthy, if so return it +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); +module.exports = runtime; +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + if (typeof globalThis === "object") { + globalThis.regeneratorRuntime = runtime; + } else { + Function("r", "regeneratorRuntime = r")(runtime); + } +} - if (this.nearestNode != null) { - this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: Node ").concat(this.nearestNode.index, " is ").concat(this.nearestNode.isHealthy === true ? "Healthy" : "Unhealthy")); - if (this.nearestNode.isHealthy === true || this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) { - this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(this.nearestNode.index)); - return this.nearestNode; - } +/***/ }), - this.logger.debug("Request #".concat(requestNumber, ": Falling back to individual nodes")); - } // Fallback to nodes as usual +/***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _arrayLikeToArray) +/* harmony export */ }); +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; +} - this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: ").concat(this.nodes.map(function (node) { - return "Node ".concat(node.index, " is ").concat(node.isHealthy === true ? "Healthy" : "Unhealthy"); - }).join(" || "))); - var candidateNode = this.nodes[0]; +/***/ }), - for (var i = 0; i <= this.nodes.length; i++) { - this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length; - candidateNode = this.nodes[this.currentNodeIndex]; +/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - if (candidateNode.isHealthy === true || this.nodeDueForHealthcheck(candidateNode, requestNumber)) { - this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(candidateNode.index)); - return candidateNode; - } - } // None of the nodes are marked healthy, but some of them could have become healthy since last health check. - // So we will just return the next node. +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _arrayWithHoles) +/* harmony export */ }); +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +/***/ }), - this.logger.debug("Request #".concat(requestNumber, ": No healthy nodes were found. Returning the next node, Node ").concat(candidateNode.index)); - return candidateNode; - }; +/***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) { - if (requestNumber === void 0) { - requestNumber = 0; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _arrayWithoutHoles) +/* harmony export */ }); +/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js"); - var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp > this.healthcheckIntervalSeconds * 1000; +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr); +} - if (isDueForHealthcheck) { - this.logger.debug("Request #".concat(requestNumber, ": Node ").concat(node.index, " has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds, ". Adding it back into rotation.")); - } +/***/ }), - return isDueForHealthcheck; - }; +/***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": +/*!**************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - ApiCall.prototype.initializeMetadataForNodes = function () { - var _this = this; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _assertThisInitialized) +/* harmony export */ }); +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return self; +} - if (this.nearestNode != null) { - this.nearestNode.index = "nearestNode"; - this.setNodeHealthcheck(this.nearestNode, HEALTHY); - } +/***/ }), - this.nodes.forEach(function (node, i) { - node.index = i; +/***/ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - _this.setNodeHealthcheck(node, HEALTHY); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _asyncToGenerator) +/* harmony export */ }); +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve(value); + } else { + Promise.resolve(value).then(_next, _throw); + } +} +function _asyncToGenerator(fn) { + return function () { + var self = this, + args = arguments; + return new Promise(function (resolve, reject) { + var gen = fn.apply(self, args); + function _next(value) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); + } + _next(undefined); }); }; +} - ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) { - node.isHealthy = isHealthy; - node.lastAccessTimestamp = Date.now(); - }; - - ApiCall.prototype.uriFor = function (endpoint, node) { - if (node.url != null) { - return "".concat(node.url).concat(endpoint); - } +/***/ }), - return "".concat(node.protocol, "://").concat(node.host, ":").concat(node.port).concat(node.path).concat(endpoint); - }; +/***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - ApiCall.prototype.defaultHeaders = function () { - var defaultHeaders = {}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _classCallCheck) +/* harmony export */ }); +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} - if (!this.sendApiKeyAsQueryParam) { - defaultHeaders[APIKEYHEADERNAME] = this.apiKey; - } +/***/ }), - defaultHeaders["Content-Type"] = "application/json"; - return defaultHeaders; - }; +/***/ "./node_modules/@babel/runtime/helpers/esm/construct.js": +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/construct.js ***! + \**************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - ApiCall.prototype.timer = function (seconds) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , new Promise(function (resolve) { - return setTimeout(resolve, seconds * 1000); - })]; - }); - }); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _construct) +/* harmony export */ }); +/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"); +/* harmony import */ var _isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js"); - ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) { - var errorMessage = "Request failed with HTTP code ".concat(response.status); - if (typeof messageFromServer === "string" && messageFromServer.trim() !== "") { - errorMessage += " | Server said: ".concat(messageFromServer); - } +function _construct(Parent, args, Class) { + if ((0,_isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_1__["default"])()) { + _construct = Reflect.construct.bind(); + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(instance, Class.prototype); + return instance; + }; + } + return _construct.apply(null, arguments); +} - var error = new TypesenseError_1["default"](errorMessage); +/***/ }), - if (response.status === 400) { - error = new Errors_1.RequestMalformed(errorMessage); - } else if (response.status === 401) { - error = new Errors_1.RequestUnauthorized(errorMessage); - } else if (response.status === 404) { - error = new Errors_1.ObjectNotFound(errorMessage); - } else if (response.status === 409) { - error = new Errors_1.ObjectAlreadyExists(errorMessage); - } else if (response.status === 422) { - error = new Errors_1.ObjectUnprocessable(errorMessage); - } else if (response.status >= 500 && response.status <= 599) { - error = new Errors_1.ServerError(errorMessage); - } else { - error = new Errors_1.HTTPError(errorMessage); - } +/***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***! + \****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - error.httpStatus = response.status; - return error; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _createClass) +/* harmony export */ }); +/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"); + +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(descriptor.key), descriptor); + } +} +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; +} - return ApiCall; -}(); +/***/ }), -exports["default"] = ApiCall; +/***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -},{"./Errors":62,"./Errors/TypesenseError":61,"@babel/runtime/helpers/interopRequireDefault":1,"@babel/runtime/helpers/typeof":2,"axios":3}],61:[function(require,module,exports){ "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _defineProperty) +/* harmony export */ }); +/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"); + +function _defineProperty(obj, key, value) { + key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key); + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; +} -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - return _extendStatics(d, b); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _getPrototypeOf) +/* harmony export */ }); +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); }; + return _getPrototypeOf(o); +} - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +/***/ }), - _extendStatics(d, b); +/***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js": +/*!*************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***! + \*************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - function __() { - this.constructor = d; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _inherits) +/* harmony export */ }); +/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true } + }); + Object.defineProperty(subClass, "prototype", { + writable: false + }); + if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(subClass, superClass); +} - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -Object.defineProperty(exports, "__esModule", { - value: true -}); +/***/ }), -var TypesenseError = -/** @class */ -function (_super) { - __extends(TypesenseError, _super); // Source: https://stackoverflow.com/a/58417721/123545 +/***/ "./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _isNativeFunction) +/* harmony export */ }); +function _isNativeFunction(fn) { + try { + return Function.toString.call(fn).indexOf("[native code]") !== -1; + } catch (e) { + return typeof fn === "function"; + } +} - function TypesenseError(message) { - var _newTarget = this.constructor; +/***/ }), - var _this = _super.call(this, message) || this; +/***/ "./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - _this.name = _newTarget.name; - Object.setPrototypeOf(_this, _newTarget.prototype); - return _this; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _isNativeReflectConstruct) +/* harmony export */ }); +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; } +} - return TypesenseError; -}(Error); +/***/ }), -exports["default"] = TypesenseError; +/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js": +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! + \********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -},{}],48:[function(require,module,exports){ "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _iterableToArray) +/* harmony export */ }); +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} + +/***/ }), -var __assign = void 0 && (void 0).__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; +/***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js": +/*!*************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _iterableToArrayLimit) +/* harmony export */ }); +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; + } finally { + if (o) throw n; } } + return a; + } +} - return t; - }; +/***/ }), - return __assign.apply(this, arguments); -}; +/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js": +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***! + \********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _nonIterableRest) +/* harmony export */ }); +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function get() { - return m[k]; - } - }; - } +/***/ }), - Object.defineProperty(o, k2, desc); -} : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); +/***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _nonIterableSpread) +/* harmony export */ }); +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js": +/*!******************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _possibleConstructorReturn) +/* harmony export */ }); +/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); +/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); -var __setModuleDefault = void 0 && (void 0).__setModuleDefault || (Object.create ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function (o, v) { - o["default"] = v; -}); -var __importStar = void 0 && (void 0).__importStar || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) { - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); +function _possibleConstructorReturn(self, call) { + if (call && ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(call) === "object" || typeof call === "function")) { + return call; + } else if (call !== void 0) { + throw new TypeError("Derived constructors may only return object or undefined"); } + return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__["default"])(self); +} - __setModuleDefault(result, mod); +/***/ }), - return result; -}; +/***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": +/*!*******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -Object.defineProperty(exports, "__esModule", { - value: true -}); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _setPrototypeOf) +/* harmony export */ }); +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); +} -var logger = __importStar(require("loglevel")); +/***/ }), -var Errors_1 = require("./Errors"); +/***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***! + \******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -var Configuration = -/** @class */ -function () { - function Configuration(options) { - var _this = this; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _slicedToArray) +/* harmony export */ }); +/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"); +/* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js"); +/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"); +/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js"); - this.nodes = options.nodes || []; - this.nodes = this.nodes.map(function (node) { - return _this.setDefaultPathInNode(node); - }).map(function (node) { - return _this.setDefaultPortInNode(node); - }).map(function (node) { - return __assign({}, node); - }); // Make a deep copy - if (options.randomizeNodes == null) { - options.randomizeNodes = true; - } - if (options.randomizeNodes === true) { - this.shuffleArray(this.nodes); - } - this.nearestNode = options.nearestNode; - this.nearestNode = this.setDefaultPathInNode(this.nearestNode); - this.nearestNode = this.setDefaultPortInNode(this.nearestNode); - this.connectionTimeoutSeconds = options.connectionTimeoutSeconds || options.timeoutSeconds || 5; - this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60; - this.numRetries = options.numRetries || this.nodes.length + (this.nearestNode == null ? 0 : 1) || 3; - this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1; - this.apiKey = options.apiKey; - this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient +function _slicedToArray(arr, i) { + return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || (0,_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr, i) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr, i) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); +} - this.cacheSearchResultsForSeconds = options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default +/***/ }), - this.useServerSideSearchCache = options.useServerSideSearchCache || false; - this.logger = options.logger || logger; - this.logLevel = options.logLevel || "warn"; - this.logger.setLevel(this.logLevel); - this.additionalHeaders = options.additionalHeaders; - this.showDeprecationWarnings(options); - this.validate(); - } +/***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js": +/*!**********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - Configuration.prototype.validate = function () { - if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) { - throw new Errors_1.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set"); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _toConsumableArray) +/* harmony export */ }); +/* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js"); +/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"); +/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"); +/* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js"); - if (this.nearestNode != null && this.isNodeMissingAnyParameters(this.nearestNode)) { - throw new Errors_1.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set"); - } - if (this.apiKey == null) { - throw new Errors_1.MissingConfigurationError("Ensure that apiKey is set"); - } - return true; - }; - Configuration.prototype.validateNodes = function () { - var _this = this; +function _toConsumableArray(arr) { + return (0,_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr) || (0,_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); +} - return this.nodes.some(function (node) { - return _this.isNodeMissingAnyParameters(node); - }); - }; +/***/ }), - Configuration.prototype.isNodeMissingAnyParameters = function (node) { - return !["protocol", "host", "port", "path"].every(function (key) { - return node.hasOwnProperty(key); - }) && node["url"] == null; - }; +/***/ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***! + \****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - Configuration.prototype.setDefaultPathInNode = function (node) { - if (node != null && !node.hasOwnProperty("path")) { - node["path"] = ""; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _toPrimitive) +/* harmony export */ }); +/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); - return node; - }; +function _toPrimitive(input, hint) { + if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(input) !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(res) !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); +} - Configuration.prototype.setDefaultPortInNode = function (node) { - if (node != null && !node.hasOwnProperty("port") && node.hasOwnProperty("protocol")) { - switch (node["protocol"]) { - case "https": - node["port"] = 443; - break; +/***/ }), - case "http": - node["port"] = 80; - break; - } - } +/***/ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***! + \******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - return node; - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _toPropertyKey) +/* harmony export */ }); +/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); +/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js"); - Configuration.prototype.showDeprecationWarnings = function (options) { - if (options.timeoutSeconds) { - this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"); - } - if (options.masterNode) { - this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"); - } +function _toPropertyKey(arg) { + var key = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arg, "string"); + return (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key) === "symbol" ? key : String(key); +} - if (options.readReplicaNodes) { - this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12"); - } - }; +/***/ }), - Configuration.prototype.shuffleArray = function (array) { - var _a; +/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js": +/*!***********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - for (var i = array.length - 1; i > 0; i--) { - var j = Math.floor(Math.random() * (i + 1)); - _a = [array[j], array[i]], array[i] = _a[0], array[j] = _a[1]; - } - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _typeof) +/* harmony export */ }); +function _typeof(o) { + "@babel/helpers - typeof"; - return Configuration; -}(); + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} + +/***/ }), -exports["default"] = Configuration; +/***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -},{"./Errors":62,"loglevel":36}],67:[function(require,module,exports){ "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray) +/* harmony export */ }); +/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js"); -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen); +} - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } +/***/ }), - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } +/***/ "./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js": +/*!********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js ***! + \********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ _wrapNativeSuper) +/* harmony export */ }); +/* harmony import */ var _getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); +/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"); +/* harmony import */ var _isNativeFunction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isNativeFunction.js */ "./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js"); +/* harmony import */ var _construct_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./construct.js */ "./node_modules/@babel/runtime/helpers/esm/construct.js"); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !(0,_isNativeFunction_js__WEBPACK_IMPORTED_MODULE_2__["default"])(Class)) return Class; + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + _cache.set(Class, Wrapper); + } + function Wrapper() { + return (0,_construct_js__WEBPACK_IMPORTED_MODULE_3__["default"])(Class, arguments, (0,_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this).constructor); + } + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Wrapper, Class); + }; + return _wrapNativeSuper(Class); +} - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; +/***/ }), - switch (op[0]) { - case 0: - case 1: - t = op; - break; +/***/ "./node_modules/axios/lib/adapters/adapters.js": +/*!*****************************************************!*\ + !*** ./node_modules/axios/lib/adapters/adapters.js ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - case 4: - _.label++; - return { - value: op[1], - done: false - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _http_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http.js */ "./node_modules/axios/lib/helpers/null.js"); +/* harmony import */ var _xhr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./xhr.js */ "./node_modules/axios/lib/adapters/xhr.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } +const knownAdapters = { + http: _http_js__WEBPACK_IMPORTED_MODULE_0__["default"], + xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_1__["default"] +} - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, 'name', {value}); + } catch (e) { + // eslint-disable-next-line no-empty + } + Object.defineProperty(fn, 'adapterName', {value}); + } +}); - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } +const renderReason = (reason) => `- ${reason}`; - if (t && _.label < t[2]) { - _.label = t[2]; +const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFunction(adapter) || adapter === null || adapter === false; - _.ops.push(op); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + getAdapter: (adapters) => { + adapters = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isArray(adapters) ? adapters : [adapters]; - break; - } + const {length} = adapters; + let nameOrAdapter; + let adapter; + + const rejectedReasons = {}; - if (t[2]) _.ops.pop(); + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; - _.trys.pop(); + adapter = nameOrAdapter; - continue; + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + + if (adapter === undefined) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](`Unknown adapter '${id}'`); } + } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; + if (adapter) { + break; } + + rejectedReasons[id || '#' + i] = adapter; } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; + if (!adapter) { + + const reasons = Object.entries(rejectedReasons) + .map(([id, state]) => `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; + let s = length ? + (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : + 'as no adapter specified'; + + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]( + `There is no suitable adapter to dispatch the request ` + s, + 'ERR_NOT_SUPPORT' + ); + } -Object.defineProperty(exports, "__esModule", { - value: true + return adapter; + }, + adapters: knownAdapters }); -var RequestWithCache_1 = __importDefault(require("./RequestWithCache")); -var RESOURCEPATH = "/multi_search"; +/***/ }), -var MultiSearch = -/** @class */ -function () { - function MultiSearch(apiCall, configuration, useTextContentType) { - if (useTextContentType === void 0) { - useTextContentType = false; - } +/***/ "./node_modules/axios/lib/adapters/xhr.js": +/*!************************************************!*\ + !*** ./node_modules/axios/lib/adapters/xhr.js ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - this.apiCall = apiCall; - this.configuration = configuration; - this.useTextContentType = useTextContentType; - this.requestWithCache = new RequestWithCache_1["default"](); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../core/settle.js */ "./node_modules/axios/lib/core/settle.js"); +/* harmony import */ var _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../helpers/cookies.js */ "./node_modules/axios/lib/helpers/cookies.js"); +/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); +/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); +/* harmony import */ var _helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../helpers/isURLSameOrigin.js */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js"); +/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); +/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); +/* harmony import */ var _helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js"); - MultiSearch.prototype.clearCache = function () { - this.requestWithCache.clearCache(); - }; - MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) { - if (commonParams === void 0) { - commonParams = {}; - } - var _b = _a === void 0 ? {} : _a, - _c = _b.cacheSearchResultsForSeconds, - cacheSearchResultsForSeconds = _c === void 0 ? this.configuration.cacheSearchResultsForSeconds : _c; - return __awaiter(this, void 0, void 0, function () { - var additionalHeaders, additionalQueryParams, queryParams; - return __generator(this, function (_d) { - additionalHeaders = {}; - if (this.useTextContentType) { - additionalHeaders["content-type"] = "text/plain"; - } - additionalQueryParams = {}; - if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; - } - queryParams = Object.assign({}, commonParams, additionalQueryParams); - return [2 - /*return*/ - , this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { - cacheResponseForSeconds: cacheSearchResultsForSeconds - })]; - }); - }); - }; - return MultiSearch; -}(); -exports["default"] = MultiSearch; -},{"./RequestWithCache":73}],47:[function(require,module,exports){ -"use strict"; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +function progressEventReducer(listener, isDownloadStream) { + let bytesNotified = 0; + const _speedometer = (0,_helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250); -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + return e => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; - function verb(n) { - return function (v) { - return step([n, v]); + bytesNotified = loaded; + + const data = { + loaded, + total, + progress: total ? (loaded / total) : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total && inRange ? (total - loaded) / rate : undefined, + event: e }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); + data[isDownloadStream ? 'download' : 'upload'] = true; - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; + listener(data); + }; +} - switch (op[0]) { - case 0: - case 1: - t = op; - break; +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; - case 4: - _.label++; - return { - value: op[1], - done: false - }; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported && function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let requestData = config.data; + const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers).normalize(); + const responseType = config.responseType; + let onCanceled; + function done() { + if (config.cancelToken) { + config.cancelToken.unsubscribe(onCanceled); + } - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + if (config.signal) { + config.signal.removeEventListener('abort', onCanceled); + } + } - case 7: - op = _.ops.pop(); + let contentType; - _.trys.pop(); + if (_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFormData(requestData)) { + if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].isStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].isStandardBrowserWebWorkerEnv) { + requestHeaders.setContentType(false); // Let the browser set it + } else if(!requestHeaders.getContentType(/^\s*multipart\/form-data/)){ + requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks + } else if(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isString(contentType = requestHeaders.getContentType())){ + // fix semicolon duplication issue for ReactNative FormData implementation + requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, '$1')) + } + } - continue; + let request = new XMLHttpRequest(); - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + // HTTP basic authentication + if (config.auth) { + const username = config.auth.username || ''; + const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; + requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password)); + } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config.baseURL, config.url); - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + request.open(config.method.toUpperCase(), (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__["default"])(fullPath, config.params, config.paramsSerializer), true); - if (t && _.label < t[2]) { - _.label = t[2]; + // Set the request timeout in MS + request.timeout = config.timeout; - _.ops.push(op); + function onloadend() { + if (!request) { + return; + } + // Prepare the response + const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === 'text' || responseType === 'json' ? + request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request + }; - break; - } + (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_6__["default"])(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); - if (t[2]) _.ops.pop(); + // Clean up request + request = null; + } - _.trys.pop(); + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } - continue; + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; } - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true + reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ECONNABORTED, config, request)); + + // Clean up request + request = null; }; - } -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var RESOURCEPATH = "/collections"; + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ERR_NETWORK, config, request)); -var Collections = -/** @class */ -function () { - function Collections(apiCall) { - this.apiCall = apiCall; - } + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; + const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__["default"]; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"]( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ECONNABORTED, + config, + request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].isStandardBrowserEnv) { + // Add xsrf header + // regarding CVE-2023-45857 config.withCredentials condition was removed temporarily + const xsrfValue = (0,_helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__["default"])(fullPath) && config.xsrfCookieName && _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__["default"].read(config.xsrfCookieName); - Collections.prototype.create = function (schema, options) { - if (options === void 0) { - options = {}; + if (xsrfValue) { + requestHeaders.set(config.xsrfHeaderName, xsrfValue); + } } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.post(RESOURCEPATH, schema, options)]; - }); - }); - }; + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); - Collections.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(RESOURCEPATH)]; + // Add headers to the request + if ('setRequestHeader' in request) { + _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); }); - }); - }; - - Object.defineProperty(Collections, "RESOURCEPATH", { - get: function get() { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Collections; -}(); + } -exports["default"] = Collections; + // Add withCredentials to request if needed + if (!_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } -},{}],49:[function(require,module,exports){ -"use strict"; + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = config.responseType; + } -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true)); + } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress)); } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + if (config.cancelToken || config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = cancel => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__["default"](null, config, request) : cancel); + request.abort(); + request = null; + }; + + config.cancelToken && config.cancelToken.subscribe(onCanceled); + if (config.signal) { + config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); } } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__["default"])(fullPath); + + if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].protocols.indexOf(protocol) === -1) { + reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__["default"].ERR_BAD_REQUEST, config)); + return; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + // Send the request + request.send(requestData || null); + }); +}); - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); +/***/ }), - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; +/***/ "./node_modules/axios/lib/axios.js": +/*!*****************************************!*\ + !*** ./node_modules/axios/lib/axios.js ***! + \*****************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - switch (op[0]) { - case 0: - case 1: - t = op; - break; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); +/* harmony import */ var _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/Axios.js */ "./node_modules/axios/lib/core/Axios.js"); +/* harmony import */ var _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core/mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); +/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); +/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); +/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); +/* harmony import */ var _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cancel/CancelToken.js */ "./node_modules/axios/lib/cancel/CancelToken.js"); +/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); +/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./env/data.js */ "./node_modules/axios/lib/env/data.js"); +/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js"); +/* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); +/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); +/* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js"); - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var RESOURCEPATH = "/debug"; -var Debug = -/** @class */ -function () { - function Debug(apiCall) { - this.apiCall = apiCall; - } - Debug.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; - return Debug; -}(); +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + const context = new _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"](defaultConfig); + const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.request, context); -exports["default"] = Debug; + // Copy axios.prototype to instance + _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype, context, {allOwnKeys: true}); -},{}],63:[function(require,module,exports){ -"use strict"; + // Copy context to instance + _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].extend(instance, context, null, {allOwnKeys: true}); -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance((0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(defaultConfig, instanceConfig)); + }; - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } + return instance; +} - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } +// Create the default instance to be exported +const axios = createInstance(_defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } +// Expose Axios class to allow class inheritance +axios.Axios = _core_Axios_js__WEBPACK_IMPORTED_MODULE_0__["default"]; - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +// Expose Cancel & CancelToken +axios.CanceledError = _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_5__["default"]; +axios.CancelToken = _cancel_CancelToken_js__WEBPACK_IMPORTED_MODULE_6__["default"]; +axios.isCancel = _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_7__["default"]; +axios.VERSION = _env_data_js__WEBPACK_IMPORTED_MODULE_8__.VERSION; +axios.toFormData = _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_9__["default"]; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; +// Expose AxiosError class +axios.AxiosError = _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_10__["default"]; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } +// alias for CanceledError for backward compatibility +axios.Cancel = axios.CanceledError; - function step(op) { - if (f) throw new TypeError("Generator is already executing."); +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; +axios.spread = _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__["default"]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; +// Expose isAxiosError +axios.isAxiosError = _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__["default"]; - case 4: - _.label++; - return { - value: op[1], - done: false - }; +// Expose mergeConfig +axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["default"]; - case 7: - op = _.ops.pop(); +axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing); - _.trys.pop(); +axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter; - continue; +axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"]; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } +axios.default = axios; - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +// this module should only have a default export +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axios); - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; +/***/ }), - _.ops.push(op); +/***/ "./node_modules/axios/lib/cancel/CancelToken.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/cancel/CancelToken.js ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - break; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ +class CancelToken { + constructor(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; + let resolvePromise; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var RESOURCEPATH = "/health"; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); -var Health = -/** @class */ -function () { - function Health(apiCall) { - this.apiCall = apiCall; - } + const token = this; - Health.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(RESOURCEPATH)]; - }); + // eslint-disable-next-line func-names + this.promise.then(cancel => { + if (!token._listeners) return; + + let i = token._listeners.length; + + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; }); - }; - return Health; -}(); + // eslint-disable-next-line func-names + this.promise.then = onfulfilled => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise(resolve => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); -exports["default"] = Health; + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; -},{}],72:[function(require,module,exports){ -"use strict"; + return promise; + }; + + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); + token.reason = new _CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](message, config, request); + resolvePromise(token.reason); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; } + } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; } + } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + /** + * Unsubscribe from the cancel signal + */ -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } - function verb(n) { - return function (v) { - return step([n, v]); + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel }; } +} - function step(op) { - if (f) throw new TypeError("Generator is already executing."); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CancelToken); - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; +/***/ }), - case 4: - _.label++; - return { - value: op[1], - done: false - }; +/***/ "./node_modules/axios/lib/cancel/CanceledError.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/cancel/CanceledError.js ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +/** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ +function CanceledError(message, config, request) { + // eslint-disable-next-line no-eq-null,eqeqeq + _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request); + this.name = 'CanceledError'; +} - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } +_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], { + __CANCEL__: true +}); - if (t && _.label < t[2]) { - _.label = t[2]; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError); - _.ops.push(op); - break; - } +/***/ }), - if (t[2]) _.ops.pop(); +/***/ "./node_modules/axios/lib/cancel/isCancel.js": +/*!***************************************************!*\ + !*** ./node_modules/axios/lib/cancel/isCancel.js ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - _.trys.pop(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ isCancel) +/* harmony export */ }); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } +function isCancel(value) { + return !!(value && value.__CANCEL__); +} - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var RESOURCEPATH = "/presets"; +/***/ }), -var Presets = -/** @class */ -function () { - function Presets(apiCall) { - this.apiCall = apiCall; - } +/***/ "./node_modules/axios/lib/core/Axios.js": +/*!**********************************************!*\ + !*** ./node_modules/axios/lib/core/Axios.js ***! + \**********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - Presets.prototype.upsert = function (presetId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.put(this.endpointPath(presetId), params)]; - }); - }); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js"); +/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js"); +/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js"); +/* harmony import */ var _mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeConfig.js */ "./node_modules/axios/lib/core/mergeConfig.js"); +/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js"); +/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js"); +/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - Presets.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Presets.prototype.endpointPath = function (operation) { - return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); - }; - Object.defineProperty(Presets, "RESOURCEPATH", { - get: function get() { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Presets; -}(); -exports["default"] = Presets; -},{}],66:[function(require,module,exports){ -"use strict"; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; +const validators = _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].validators; - function verb(n) { - return function (v) { - return step([n, v]); +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ +class Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"](), + response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_1__["default"]() }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } - switch (op[0]) { - case 0: - case 1: - t = op; - break; + config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); - case 4: - _.label++; - return { - value: op[1], - done: false - }; + const {transitional, paramsSerializer, headers} = config; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + if (transitional !== undefined) { + _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(transitional, { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean) + }, false); + } - case 7: - op = _.ops.pop(); + if (paramsSerializer != null) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer + } + } else { + _helpers_validator_js__WEBPACK_IMPORTED_MODULE_0__["default"].assertOptions(paramsSerializer, { + encode: validators.function, + serialize: validators.function + }, true); + } + } - _.trys.pop(); + // Set config.method + config.method = (config.method || this.defaults.method || 'get').toLowerCase(); - continue; + // Flatten headers + let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge( + headers.common, + headers[config.method] + ); - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + (method) => { + delete headers[method]; + } + ); - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].concat(contextHeaders, headers); - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } - if (t && _.label < t[2]) { - _.label = t[2]; + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - _.ops.push(op); + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + }); - break; - } + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); - if (t[2]) _.ops.pop(); + let promise; + let i = 0; + let len; - _.trys.pop(); + if (!synchronousRequestInterceptors) { + const chain = [_dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(this), undefined]; + chain.unshift.apply(chain, requestInterceptorChain); + chain.push.apply(chain, responseInterceptorChain); + len = chain.length; - continue; - } + promise = Promise.resolve(config); - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var RESOURCEPATH = "/metrics.json"; - -var Metrics = -/** @class */ -function () { - function Metrics(apiCall) { - this.apiCall = apiCall; - } - - Metrics.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; - return Metrics; -}(); + return promise; + } -exports["default"] = Metrics; + len = requestInterceptorChain.length; -},{}],68:[function(require,module,exports){ -"use strict"; + let newConfig = config; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } + i = 0; - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; try { - step(generator.next(value)); - } catch (e) { - reject(e); + newConfig = onFulfilled(newConfig); + } catch (error) { + onRejected.call(this, error); + break; } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + try { + promise = _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_5__["default"].call(this, newConfig); + } catch (error) { + return Promise.reject(error); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + i = 0; + len = responseInterceptorChain.length; + + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + return promise; + } + + getUri(config) { + config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.defaults, config); + const fullPath = (0,_buildFullPath_js__WEBPACK_IMPORTED_MODULE_6__["default"])(config.baseURL, config.url); + return (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(fullPath, config.params, config.paramsSerializer); + } +} + +// Provide aliases for supported request methods +_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { + method, + url, + data: (config || {}).data + })); + }; +}); -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; +_utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ - function verb(n) { - return function (v) { - return step([n, v]); + function generateHTTPMethod(isForm) { + return function httpMethod(url, data, config) { + return this.request((0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_2__["default"])(config || {}, { + method, + headers: isForm ? { + 'Content-Type': 'multipart/form-data' + } : {}, + url, + data + })); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + Axios.prototype[method] = generateHTTPMethod(); - case 7: - op = _.ops.pop(); - - _.trys.pop(); + Axios.prototype[method + 'Form'] = generateHTTPMethod(true); +}); - continue; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Axios); - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +/***/ }), - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } +/***/ "./node_modules/axios/lib/core/AxiosError.js": +/*!***************************************************!*\ + !*** ./node_modules/axios/lib/core/AxiosError.js ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - if (t && _.label < t[2]) { - _.label = t[2]; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); +/** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ +function AxiosError(message, code, config, request, response) { + Error.call(this); - continue; - } + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = (new Error()).stack; + } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } + this.message = message; + this.name = 'AxiosError'; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + response && (this.response = response); +} - if (op[0] & 5) throw op[1]; +_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, { + toJSON: function toJSON() { return { - value: op[0] ? op[1] : void 0, - done: true + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config), + code: this.code, + status: this.response && this.response.status ? this.response.status : null }; } -}; - -Object.defineProperty(exports, "__esModule", { - value: true }); -var RESOURCEPATH = "/operations"; - -var Operations = -/** @class */ -function () { - function Operations(apiCall) { - this.apiCall = apiCall; - } - - Operations.prototype.perform = function (operationName, queryParameters) { - if (queryParameters === void 0) { - queryParameters = {}; - } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.post("".concat(RESOURCEPATH, "/").concat(operationName), {}, queryParameters)]; - }); - }); - }; +const prototype = AxiosError.prototype; +const descriptors = {}; + +[ + 'ERR_BAD_OPTION_VALUE', + 'ERR_BAD_OPTION', + 'ECONNABORTED', + 'ETIMEDOUT', + 'ERR_NETWORK', + 'ERR_FR_TOO_MANY_REDIRECTS', + 'ERR_DEPRECATED', + 'ERR_BAD_RESPONSE', + 'ERR_BAD_REQUEST', + 'ERR_CANCELED', + 'ERR_NOT_SUPPORT', + 'ERR_INVALID_URL' +// eslint-disable-next-line func-names +].forEach(code => { + descriptors[code] = {value: code}; +}); - return Operations; -}(); +Object.defineProperties(AxiosError, descriptors); +Object.defineProperty(prototype, 'isAxiosError', {value: true}); -exports["default"] = Operations; +// eslint-disable-next-line func-names +AxiosError.from = (error, code, config, request, response, customProps) => { + const axiosError = Object.create(prototype); -},{}],64:[function(require,module,exports){ -"use strict"; + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) { + return obj !== Error.prototype; + }, prop => { + return prop !== 'isAxiosError'; + }); -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } + AxiosError.call(axiosError, error.message, code, config, request, response); - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } + axiosError.cause = error; - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } + axiosError.name = error.name; - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } + customProps && Object.assign(axiosError, customProps); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + return axiosError; }; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError); - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; +/***/ }), - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +/***/ "./node_modules/axios/lib/core/AxiosHeaders.js": +/*!*****************************************************!*\ + !*** ./node_modules/axios/lib/core/AxiosHeaders.js ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - case 7: - op = _.ops.pop(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/parseHeaders.js */ "./node_modules/axios/lib/helpers/parseHeaders.js"); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } +const $internals = Symbol('internals'); - if (t && _.label < t[2]) { - _.label = t[2]; +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} - _.ops.push(op); +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } - break; - } + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value); +} - if (t[2]) _.ops.pop(); +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; - _.trys.pop(); + while ((match = tokensRE.exec(str))) { + tokens[match[1]] = match[2]; + } - continue; - } + return tokens; +} - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } +const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(filter)) { + return filter.call(this, value, header); } -}; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; + if (isHeaderNameFilter) { + value = header; + } -Object.defineProperty(exports, "__esModule", { - value: true -}); + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(value)) return; -var Keys_1 = __importDefault(require("./Keys")); + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(filter)) { + return value.indexOf(filter) !== -1; + } -var Key = -/** @class */ -function () { - function Key(id, apiCall) { - this.id = id; - this.apiCall = apiCall; + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(filter)) { + return filter.test(value); } +} - Key.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); +function formatHeader(header) { + return header.trim() + .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; }); - }; +} - Key.prototype["delete"] = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); +function buildAccessors(obj, header) { + const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header); + + ['get', 'set', 'has'].forEach(methodName => { + Object.defineProperty(obj, methodName + accessorName, { + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true }); - }; + }); +} - Key.prototype.endpointPath = function () { - return "".concat(Keys_1["default"].RESOURCEPATH, "/").concat(this.id); - }; +class AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } - return Key; -}(); + set(header, valueOrRewrite, rewrite) { + const self = this; -exports["default"] = Key; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); -},{"./Keys":65}],71:[function(require,module,exports){ -"use strict"; + if (!lHeader) { + throw new Error('header name must be a non-empty string'); + } -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader); - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { + self[key || _header] = normalizeValue(_value); } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } + const setHeaders = (headers, _rewrite) => + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite) + } else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); + get(header, parser) { + header = normalizeHeader(header); - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; + if (header) { + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - switch (op[0]) { - case 0: - case 1: - t = op; - break; + if (key) { + const value = this[key]; - case 4: - _.label++; - return { - value: op[1], - done: false - }; + if (!parser) { + return value; + } - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + if (parser === true) { + return parseTokens(value); + } - case 7: - op = _.ops.pop(); + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(parser)) { + return parser.call(this, value, key); + } - _.trys.pop(); + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isRegExp(parser)) { + return parser.exec(value); + } - continue; + throw new TypeError('parser must be boolean|regexp|function'); + } + } + } - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + has(header, matcher) { + header = normalizeHeader(header); - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + if (header) { + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header); - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } - if (t && _.label < t[2]) { - _.label = t[2]; + return false; + } - _.ops.push(op); + delete(header, matcher) { + const self = this; + let deleted = false; - break; - } + function deleteHeader(_header) { + _header = normalizeHeader(_header); - if (t[2]) _.ops.pop(); + if (_header) { + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, _header); - _.trys.pop(); + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; - continue; + deleted = true; } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; } } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var Presets_1 = __importDefault(require("./Presets")); + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } -var Preset = -/** @class */ -function () { - function Preset(presetId, apiCall) { - this.presetId = presetId; - this.apiCall = apiCall; + return deleted; } - Preset.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; - - Preset.prototype["delete"] = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); - }); - }; - - Preset.prototype.endpointPath = function () { - return "".concat(Presets_1["default"].RESOURCEPATH, "/").concat(this.presetId); - }; + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; - return Preset; -}(); + while (i--) { + const key = keys[i]; + if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } -exports["default"] = Preset; + return deleted; + } -},{"./Presets":72}],65:[function(require,module,exports){ -(function (Buffer){(function (){ -"use strict"; + normalize(format) { + const self = this; + const headers = {}; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { + const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(headers, header); - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const normalized = format ? formatHeader(header) : String(header).trim(); + + if (normalized !== header) { + delete self[header]; } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } + self[normalized] = normalizeValue(value); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + headers[normalized] = true; + }); -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; + concat(...targets) { + return this.constructor.concat(this, ...targets); + } - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + toJSON(asStrings) { + const obj = Object.create(null); - case 7: - op = _.ops.pop(); + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value); + }); - _.trys.pop(); + return obj; + } - continue; + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); + } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + get [Symbol.toStringTag]() { + return 'AxiosHeaders'; + } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } - if (t && _.label < t[2]) { - _.label = t[2]; + static concat(first, ...targets) { + const computed = new this(first); - _.ops.push(op); + targets.forEach((target) => computed.set(target)); - break; - } + return computed; + } - if (t[2]) _.ops.pop(); + static accessor(header) { + const internals = this[$internals] = (this[$internals] = { + accessors: {} + }); - _.trys.pop(); + const accessors = internals.accessors; + const prototype = this.prototype; - continue; - } + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; } } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + + return this; } -}; +} -Object.defineProperty(exports, "__esModule", { - value: true +AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); + +// reserved names hotfix +_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } + } }); -var crypto_1 = require("crypto"); +_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders); -var RESOURCEPATH = "/keys"; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders); -var Keys = -/** @class */ -function () { - function Keys(apiCall) { - this.apiCall = apiCall; - this.apiCall = apiCall; - } - Keys.prototype.create = function (params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.post(Keys.RESOURCEPATH, params)]; - }); - }); - }; +/***/ }), - Keys.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; +/***/ "./node_modules/axios/lib/core/InterceptorManager.js": +/*!***********************************************************!*\ + !*** ./node_modules/axios/lib/core/InterceptorManager.js ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) { - // Note: only a key generated with the `documents:search` action will be - // accepted by the server, when usined with the search endpoint. - var paramsJSON = JSON.stringify(parameters); - var digest = Buffer.from((0, crypto_1.createHmac)("sha256", searchKey).update(paramsJSON).digest("base64")); - var keyPrefix = searchKey.substr(0, 4); - var rawScopedKey = "".concat(digest).concat(keyPrefix).concat(paramsJSON); - return Buffer.from(rawScopedKey).toString("base64"); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - Object.defineProperty(Keys, "RESOURCEPATH", { - get: function get() { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Keys; -}(); -exports["default"] = Keys; -}).call(this)}).call(this,require("buffer").Buffer) -},{"buffer":34,"crypto":33}],46:[function(require,module,exports){ -"use strict"; +class InterceptorManager { + constructor() { + this.handlers = []; + } -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null }); + return this.handlers.length - 1; } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; } + } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } +} - switch (op[0]) { - case 0: - case 1: - t = op; - break; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterceptorManager); - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +/***/ }), - case 7: - op = _.ops.pop(); +/***/ "./node_modules/axios/lib/core/buildFullPath.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/core/buildFullPath.js ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - _.trys.pop(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ buildFullPath) +/* harmony export */ }); +/* harmony import */ var _helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isAbsoluteURL.js */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js"); +/* harmony import */ var _helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/combineURLs.js */ "./node_modules/axios/lib/helpers/combineURLs.js"); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ +function buildFullPath(baseURL, requestedURL) { + if (baseURL && !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__["default"])(requestedURL)) { + return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__["default"])(baseURL, requestedURL); + } + return requestedURL; +} - _.ops.push(op); - break; - } +/***/ }), - if (t[2]) _.ops.pop(); +/***/ "./node_modules/axios/lib/core/dispatchRequest.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/core/dispatchRequest.js ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - _.trys.pop(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ dispatchRequest) +/* harmony export */ }); +/* harmony import */ var _transformData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transformData.js */ "./node_modules/axios/lib/core/transformData.js"); +/* harmony import */ var _cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cancel/isCancel.js */ "./node_modules/axios/lib/cancel/isCancel.js"); +/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); +/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); +/* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js"); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var Collections_1 = __importDefault(require("./Collections")); -var Documents_1 = __importDefault(require("./Documents")); -var Errors_1 = require("./Errors"); -var Overrides_1 = __importDefault(require("./Overrides")); +/** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } -var Override_1 = __importDefault(require("./Override")); + if (config.signal && config.signal.aborted) { + throw new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](null, config); + } +} -var Synonyms_1 = __importDefault(require("./Synonyms")); +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ +function dispatchRequest(config) { + throwIfCancellationRequested(config); -var Synonym_1 = __importDefault(require("./Synonym")); + config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers); -var Document_1 = require("./Document"); + // Transform request data + config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( + config, + config.transformRequest + ); -var Collection = -/** @class */ -function () { - function Collection(name, apiCall, configuration) { - this.name = name; - this.apiCall = apiCall; - this.configuration = configuration; - this.individualDocuments = {}; - this.individualOverrides = {}; - this.individualSynonyms = {}; - this.name = name; - this.apiCall = apiCall; - this.configuration = configuration; - this._documents = new Documents_1["default"](this.name, this.apiCall, this.configuration); - this._overrides = new Overrides_1["default"](this.name, this.apiCall); - this._synonyms = new Synonyms_1["default"](this.name, this.apiCall); + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); } - Collection.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; + const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_3__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_4__["default"].adapter); - Collection.prototype.update = function (schema) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.patch(this.endpointPath(), schema)]; - }); - }); - }; + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); - Collection.prototype["delete"] = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); - }); - }; + // Transform response data + response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( + config, + config.transformResponse, + response + ); - Collection.prototype.exists = function () { - return __awaiter(this, void 0, void 0, function () { - var e_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2,, 3]); - - return [4 - /*yield*/ - , this.retrieve()]; - - case 1: - _a.sent(); - - return [2 - /*return*/ - , true]; - - case 2: - e_1 = _a.sent(); - if (e_1 instanceof Errors_1.ObjectNotFound) return [2 - /*return*/ - , false]; - throw e_1; - - case 3: - return [2 - /*return*/ - ]; - } - }); - }); - }; + response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(response.headers); - Collection.prototype.documents = function (documentId) { - if (!documentId) { - return this._documents; - } else { - if (this.individualDocuments[documentId] === undefined) { - this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall); - } + return response; + }, function onAdapterRejection(reason) { + if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_5__["default"])(reason)) { + throwIfCancellationRequested(config); - return this.individualDocuments[documentId]; + // Transform response data + if (reason && reason.response) { + reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_2__["default"].call( + config, + config.transformResponse, + reason.response + ); + reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(reason.response.headers); + } } - }; - Collection.prototype.overrides = function (overrideId) { - if (overrideId === undefined) { - return this._overrides; - } else { - if (this.individualOverrides[overrideId] === undefined) { - this.individualOverrides[overrideId] = new Override_1["default"](this.name, overrideId, this.apiCall); - } + return Promise.reject(reason); + }); +} - return this.individualOverrides[overrideId]; - } - }; - Collection.prototype.synonyms = function (synonymId) { - if (synonymId === undefined) { - return this._synonyms; - } else { - if (this.individualSynonyms[synonymId] === undefined) { - this.individualSynonyms[synonymId] = new Synonym_1["default"](this.name, synonymId, this.apiCall); - } +/***/ }), - return this.individualSynonyms[synonymId]; - } - }; +/***/ "./node_modules/axios/lib/core/mergeConfig.js": +/*!****************************************************!*\ + !*** ./node_modules/axios/lib/core/mergeConfig.js ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - Collection.prototype.endpointPath = function () { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.name); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ mergeConfig) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - return Collection; -}(); -exports["default"] = Collection; -},{"./Collections":47,"./Document":50,"./Documents":51,"./Errors":62,"./Override":69,"./Overrides":70,"./Synonym":77,"./Synonyms":78}],78:[function(require,module,exports){ -"use strict"; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); + +const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? thing.toJSON() : thing; + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ +function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + const config = {}; + + function getMergedValue(target, source, caseless) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { + return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call({caseless}, target, source); + } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isPlainObject(source)) { + return _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge({}, source); + } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isArray(source)) { + return source.slice(); + } + return source; } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + // eslint-disable-next-line consistent-return + function mergeDeepProperties(a, b, caseless) { + if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { + return getMergedValue(a, b, caseless); + } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { + return getMergedValue(undefined, a, caseless); } + } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + // eslint-disable-next-line consistent-return + function valueFromConfig2(a, b) { + if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { + return getMergedValue(undefined, b); } + } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + // eslint-disable-next-line consistent-return + function defaultToConfig2(a, b) { + if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(a)) { + return getMergedValue(undefined, a); } + } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + // eslint-disable-next-line consistent-return + function mergeDirectKeys(a, b, prop) { + if (prop in config2) { + return getMergedValue(a, b); + } else if (prop in config1) { + return getMergedValue(undefined, a); + } + } + + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + }; + + _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { + const merge = mergeMap[prop] || mergeDeepProperties; + const configValue = merge(config1[prop], config2[prop], prop); + (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); }); -}; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + return config; +} - function verb(n) { - return function (v) { - return step([n, v]); - }; + +/***/ }), + +/***/ "./node_modules/axios/lib/core/settle.js": +/*!***********************************************!*\ + !*** ./node_modules/axios/lib/core/settle.js ***! + \***********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ settle) +/* harmony export */ }); +/* harmony import */ var _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); + + + + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ +function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"]( + 'Request failed with status code ' + response.status, + [_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + )); } +} - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; +/***/ }), - switch (op[0]) { - case 0: - case 1: - t = op; - break; +/***/ "./node_modules/axios/lib/core/transformData.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/core/transformData.js ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - case 4: - _.label++; - return { - value: op[1], - done: false - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ transformData) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js"); +/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js"); - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +/** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ +function transformData(fns, response) { + const config = this || _defaults_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]; + const context = response || config; + const headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(context.headers); + let data = context.data; + + _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + headers.normalize(); - if (t && _.label < t[2]) { - _.label = t[2]; + return data; +} - _.ops.push(op); - break; - } +/***/ }), + +/***/ "./node_modules/axios/lib/defaults/index.js": +/*!**************************************************!*\ + !*** ./node_modules/axios/lib/defaults/index.js ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js"); +/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); +/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); +/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js"); - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var Collections_1 = __importDefault(require("./Collections")); -var RESOURCEPATH = "/synonyms"; -var Synonyms = -/** @class */ -function () { - function Synonyms(collectionName, apiCall) { - this.collectionName = collectionName; - this.apiCall = apiCall; +/** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ +function stringifySafely(rawValue, parser, encoder) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } } - Synonyms.prototype.upsert = function (synonymId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.put(this.endpointPath(synonymId), params)]; - }); - }); - }; + return (encoder || JSON.stringify)(rawValue); +} - Synonyms.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; +const defaults = { - Synonyms.prototype.endpointPath = function (operation) { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); - }; + transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__["default"], - Object.defineProperty(Synonyms, "RESOURCEPATH", { - get: function get() { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Synonyms; -}(); + adapter: ['xhr', 'http'], -exports["default"] = Synonyms; + transformRequest: [function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data); -},{"./Collections":47}],77:[function(require,module,exports){ -"use strict"; + if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) { + data = new FormData(data); + } -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } + const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data); - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + if (isFormData) { + if (!hasJSONContentType) { + return data; } + return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__["default"])(data)) : data; } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) || + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) || + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) || + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) || + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) + ) { + return data; } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) { + return data.buffer; + } + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + let isFileList; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + if (isObjectPayload) { + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__["default"])(data, this.formSerializer).toString(); + } - function verb(n) { - return function (v) { - return step([n, v]); - }; - } + if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { + const _FormData = this.env && this.env.FormData; - function step(op) { - if (f) throw new TypeError("Generator is already executing."); + return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__["default"])( + isFileList ? {'files[]': data} : data, + _FormData && new _FormData(), + this.formSerializer + ); + } + } - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; + if (isObjectPayload || hasJSONContentType ) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } - switch (op[0]) { - case 0: - case 1: - t = op; - break; + return data; + }], - case 4: - _.label++; - return { - value: op[1], - done: false - }; + transformResponse: [function transformResponse(data) { + const transitional = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const JSONRequested = this.responseType === 'json'; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; - case 7: - op = _.ops.pop(); + try { + return JSON.parse(data); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__["default"].ERR_BAD_RESPONSE, this, null, this.response); + } + throw e; + } + } + } - _.trys.pop(); + return data; + }], - continue; + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + maxContentLength: -1, + maxBodyLength: -1, - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + env: { + FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.FormData, + Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].classes.Blob + }, - if (t && _.label < t[2]) { - _.label = t[2]; + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, - _.ops.push(op); + headers: { + common: { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': undefined + } + } +}; - break; - } +_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { + defaults.headers[method] = {}; +}); - if (t[2]) _.ops.pop(); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults); - _.trys.pop(); - continue; - } +/***/ }), - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } +/***/ "./node_modules/axios/lib/defaults/transitional.js": +/*!*********************************************************!*\ + !*** ./node_modules/axios/lib/defaults/transitional.js ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; -Object.defineProperty(exports, "__esModule", { - value: true +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false }); -var Collections_1 = __importDefault(require("./Collections")); -var Synonyms_1 = __importDefault(require("./Synonyms")); +/***/ }), -var Synonym = -/** @class */ -function () { - function Synonym(collectionName, synonymId, apiCall) { - this.collectionName = collectionName; - this.synonymId = synonymId; - this.apiCall = apiCall; - } - - Synonym.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; - - Synonym.prototype["delete"] = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); - }); - }; +/***/ "./node_modules/axios/lib/env/data.js": +/*!********************************************!*\ + !*** ./node_modules/axios/lib/env/data.js ***! + \********************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - Synonym.prototype.endpointPath = function () { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms_1["default"].RESOURCEPATH, "/").concat(this.synonymId); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ VERSION: () => (/* binding */ VERSION) +/* harmony export */ }); +const VERSION = "1.6.0"; - return Synonym; -}(); +/***/ }), -exports["default"] = Synonym; +/***/ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js": +/*!****************************************************************!*\ + !*** ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***! + \****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -},{"./Collections":47,"./Synonyms":78}],70:[function(require,module,exports){ "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); +/** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ +function encode(str) { + const charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+', + '%00': '\x00' + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { + return charMap[match]; }); -}; - -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; +} - function verb(n) { - return function (v) { - return step([n, v]); - }; - } +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ +function AxiosURLSearchParams(params, options) { + this._pairs = []; - function step(op) { - if (f) throw new TypeError("Generator is already executing."); + params && (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, this, options); +} - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; +const prototype = AxiosURLSearchParams.prototype; - switch (op[0]) { - case 0: - case 1: - t = op; - break; +prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; - case 4: - _.label++; - return { - value: op[1], - done: false - }; +prototype.toString = function toString(encoder) { + const _encode = encoder ? function(value) { + return encoder.call(this, value, encode); + } : encode; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + return this._pairs.map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '').join('&'); +}; - case 7: - op = _.ops.pop(); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams); - _.trys.pop(); - continue; +/***/ }), - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } +/***/ "./node_modules/axios/lib/helpers/HttpStatusCode.js": +/*!**********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/HttpStatusCode.js ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +const HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, +}; - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } +Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; +}); - if (t && _.label < t[2]) { - _.label = t[2]; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HttpStatusCode); - _.ops.push(op); - break; - } +/***/ }), - if (t[2]) _.ops.pop(); +/***/ "./node_modules/axios/lib/helpers/bind.js": +/*!************************************************!*\ + !*** ./node_modules/axios/lib/helpers/bind.js ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - _.trys.pop(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ bind) +/* harmony export */ }); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; +/***/ }), -Object.defineProperty(exports, "__esModule", { - value: true -}); +/***/ "./node_modules/axios/lib/helpers/buildURL.js": +/*!****************************************************!*\ + !*** ./node_modules/axios/lib/helpers/buildURL.js ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -var Collections_1 = __importDefault(require("./Collections")); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ buildURL) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); -var RESOURCEPATH = "/overrides"; -var Overrides = -/** @class */ -function () { - function Overrides(collectionName, apiCall) { - this.collectionName = collectionName; - this.apiCall = apiCall; - } - Overrides.prototype.upsert = function (overrideId, params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.put(this.endpointPath(overrideId), params)]; - }); - }); - }; - Overrides.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; - Overrides.prototype.endpointPath = function (operation) { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); - }; +/** + * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their + * URI encoded counterparts + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ +function encode(val) { + return encodeURIComponent(val). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} - Object.defineProperty(Overrides, "RESOURCEPATH", { - get: function get() { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Overrides; -}(); +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?object} options + * + * @returns {string} The formatted url + */ +function buildURL(url, params, options) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + const _encode = options && options.encode || encode; -exports["default"] = Overrides; + const serializeFn = options && options.serialize; -},{"./Collections":47}],69:[function(require,module,exports){ -"use strict"; + let serializedParams; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); + if (serializeFn) { + serializedParams = serializeFn(params, options); + } else { + serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params) ? + params.toString() : + new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, options).toString(_encode); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } + if (serializedParams) { + const hashmarkIndex = url.indexOf("#"); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); } + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + return url; +} -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } +/***/ }), - function step(op) { - if (f) throw new TypeError("Generator is already executing."); +/***/ "./node_modules/axios/lib/helpers/combineURLs.js": +/*!*******************************************************!*\ + !*** ./node_modules/axios/lib/helpers/combineURLs.js ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ combineURLs) +/* harmony export */ }); - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ +function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +} + - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +/***/ }), - case 7: - op = _.ops.pop(); +/***/ "./node_modules/axios/lib/helpers/cookies.js": +/*!***************************************************!*\ + !*** ./node_modules/axios/lib/helpers/cookies.js ***! + \***************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - _.trys.pop(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStandardBrowserEnv ? - _.ops.push(op); +// Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + const cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); - break; - } + if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } - if (t[2]) _.ops.pop(); + if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path)) { + cookie.push('path=' + path); + } - _.trys.pop(); + if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain)) { + cookie.push('domain=' + domain); + } - continue; + if (secure === true) { + cookie.push('secure'); } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); } - } + }; + })() : - if (op[0] & 5) throw op[1]; +// Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { return { - value: op[0] ? op[1] : void 0, - done: true + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} }; - } -}; - -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var Collections_1 = __importDefault(require("./Collections")); + })()); -var Overrides_1 = __importDefault(require("./Overrides")); -var Override = -/** @class */ -function () { - function Override(collectionName, overrideId, apiCall) { - this.collectionName = collectionName; - this.overrideId = overrideId; - this.apiCall = apiCall; - } +/***/ }), - Override.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; +/***/ "./node_modules/axios/lib/helpers/formDataToJSON.js": +/*!**********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/formDataToJSON.js ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - Override.prototype["delete"] = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); - }); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); - Override.prototype.endpointPath = function () { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides_1["default"].RESOURCEPATH, "/").concat(this.overrideId); - }; - return Override; -}(); -exports["default"] = Override; -},{"./Collections":47,"./Overrides":70}],50:[function(require,module,exports){ -"use strict"; +/** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ +function parsePropPath(name) { + // foo[x][y][z] + // foo.x.y.z + // foo-x-y-z + // foo x y z + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => { + return match[0] === '[]' ? '' : match[1] || match[0]; + }); +} -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); +/** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; } + return obj; +} - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); +/** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target) ? target.length : name; + + if (isLast) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + return !isNumericKey; } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(target[name])) { + target[name] = []; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + const result = buildPath(path, value, target[name], index); -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } - function verb(n) { - return function (v) { - return step([n, v]); - }; + return !isNumericKey; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(formData.entries)) { + const obj = {}; - case 4: - _.label++; - return { - value: op[1], - done: false - }; + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + return obj; + } - case 7: - op = _.ops.pop(); + return null; +} - _.trys.pop(); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (formDataToJSON); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } +/***/ }), - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +/***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js": +/*!*********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ isAbsoluteURL) +/* harmony export */ }); - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} - break; - } - if (t[2]) _.ops.pop(); +/***/ }), - _.trys.pop(); +/***/ "./node_modules/axios/lib/helpers/isAxiosError.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - continue; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ isAxiosError) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Document = void 0; +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +function isAxiosError(payload) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && (payload.isAxiosError === true); +} -var Collections_1 = __importDefault(require("./Collections")); -var Documents_1 = __importDefault(require("./Documents")); +/***/ }), -var Document = -/** @class */ -function () { - function Document(collectionName, documentId, apiCall) { - this.collectionName = collectionName; - this.documentId = documentId; - this.apiCall = apiCall; - } +/***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js": +/*!***********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - Document.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); - Document.prototype["delete"] = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); - }); - }; - Document.prototype.update = function (partialDocument, options) { - if (options === void 0) { - options = {}; - } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.patch(this.endpointPath(), partialDocument, options)]; - }); - }); - }; - Document.prototype.endpointPath = function () { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Documents_1["default"].RESOURCEPATH, "/").concat(this.documentId); - }; - return Document; -}(); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStandardBrowserEnv ? -exports.Document = Document; +// Standard browser envs have full support of the APIs needed to test +// whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + const msie = /(msie|trident)/i.test(navigator.userAgent); + const urlParsingNode = document.createElement('a'); + let originURL; -},{"./Collections":47,"./Documents":51}],51:[function(require,module,exports){ -"use strict"; + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + let href = url; -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; } - }; - return _extendStatics(d, b); - }; + urlParsingNode.setAttribute('href', href); - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } - _extendStatics(d, b); + originURL = resolveURL(window.location.href); - function __() { - this.constructor = d; - } + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })()); -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } +/***/ }), - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } +/***/ "./node_modules/axios/lib/helpers/null.js": +/*!************************************************!*\ + !*** ./node_modules/axios/lib/helpers/null.js ***! + \************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +// eslint-disable-next-line strict +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (null); - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; +/***/ }), - function verb(n) { - return function (v) { - return step([n, v]); - }; - } +/***/ "./node_modules/axios/lib/helpers/parseHeaders.js": +/*!********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js"); - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; +// RawAxiosHeaders whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]); - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => { + const parsed = {}; + let key; + let val; + let i; - case 7: - op = _.ops.pop(); + rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); - _.trys.pop(); + if (!key || (parsed[key] && ignoreDuplicateOf[key])) { + return; + } - continue; + if (key === 'set-cookie') { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + return parsed; +}); - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } +/***/ }), - if (t && _.label < t[2]) { - _.label = t[2]; +/***/ "./node_modules/axios/lib/helpers/parseProtocol.js": +/*!*********************************************************!*\ + !*** ./node_modules/axios/lib/helpers/parseProtocol.js ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - _.ops.push(op); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ parseProtocol) +/* harmony export */ }); - break; - } - if (t[2]) _.ops.pop(); +function parseProtocol(url) { + const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); + return match && match[1] || ''; +} - _.trys.pop(); - continue; - } +/***/ }), - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } +/***/ "./node_modules/axios/lib/helpers/speedometer.js": +/*!*******************************************************!*\ + !*** ./node_modules/axios/lib/helpers/speedometer.js ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); -Object.defineProperty(exports, "__esModule", { - value: true -}); -var Errors_1 = require("./Errors"); +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; -var SearchOnlyDocuments_1 = require("./SearchOnlyDocuments"); + min = min !== undefined ? min : 1000; -var Documents = -/** @class */ -function (_super) { - __extends(Documents, _super); + return function push(chunkLength) { + const now = Date.now(); - function Documents(collectionName, apiCall, configuration) { - return _super.call(this, collectionName, apiCall, configuration) || this; - } + const startedAt = timestamps[tail]; - Documents.prototype.create = function (document, options) { - if (options === void 0) { - options = {}; + if (!firstSampleTS) { + firstSampleTS = now; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (!document) throw new Error("No document provided"); - return [2 - /*return*/ - , this.apiCall.post(this.endpointPath(), document, options)]; - }); - }); - }; + bytes[head] = chunkLength; + timestamps[head] = now; - Documents.prototype.upsert = function (document, options) { - if (options === void 0) { - options = {}; + let i = tail; + let bytesCount = 0; + + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (!document) throw new Error("No document provided"); - return [2 - /*return*/ - , this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { - action: "upsert" - }))]; - }); - }); - }; + head = (head + 1) % samplesCount; - Documents.prototype.update = function (document, options) { - if (options === void 0) { - options = {}; + if (head === tail) { + tail = (tail + 1) % samplesCount; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (!document) throw new Error("No document provided"); + if (now - firstSampleTS < min) { + return; + } - if (options["filter_by"] != null) { - return [2 - /*return*/ - , this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))]; - } else { - return [2 - /*return*/ - , this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { - action: "update" - }))]; - } + const passed = startedAt && now - startedAt; - return [2 - /*return*/ - ]; - }); - }); + return passed ? Math.round(bytesCount * 1000 / passed) : undefined; }; +} - Documents.prototype["delete"] = function (idOrQuery) { - if (idOrQuery === void 0) { - idOrQuery = {}; - } +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (speedometer); - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (typeof idOrQuery === "string") { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath(idOrQuery), idOrQuery)]; - } else { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath(), idOrQuery)]; - } - return [2 - /*return*/ - ]; - }); - }); - }; +/***/ }), - Documents.prototype.createMany = function (documents, options) { - if (options === void 0) { - options = {}; - } +/***/ "./node_modules/axios/lib/helpers/spread.js": +/*!**************************************************!*\ + !*** ./node_modules/axios/lib/helpers/spread.js ***! + \**************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"); - return [2 - /*return*/ - , this["import"](documents, options)]; - }); - }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ spread) +/* harmony export */ }); + + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ +function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); }; +} - Documents.prototype["import"] = function (documents, options) { - if (options === void 0) { - options = {}; - } - return __awaiter(this, void 0, void 0, function () { - var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (Array.isArray(documents)) { - try { - documentsInJSONLFormat = documents.map(function (document) { - return JSON.stringify(document); - }).join("\n"); - } catch (error) { - // if rangeerror, throw custom error message - if (RangeError instanceof error && (error === null || error === void 0 ? void 0 : error.includes("Too many properties to enumerate"))) { - throw new Error("".concat(error, "\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n ")); - } // else, throw the non-range error anyways +/***/ }), +/***/ "./node_modules/axios/lib/helpers/toFormData.js": +/*!******************************************************!*\ + !*** ./node_modules/axios/lib/helpers/toFormData.js ***! + \******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - throw new Error(error); - } - } else { - documentsInJSONLFormat = documents; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); +/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "./node_modules/axios/lib/helpers/null.js"); - return [4 - /*yield*/ - , this.apiCall.performRequest("post", this.endpointPath("import"), { - queryParameters: options, - bodyParameters: documentsInJSONLFormat, - additionalHeaders: { - "Content-Type": "text/plain" - }, - skipConnectionTimeout: true // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully - })]; - case 1: - resultsInJSONLFormat = _a.sent(); - if (Array.isArray(documents)) { - resultsInJSONFormat = resultsInJSONLFormat.split("\n").map(function (r) { - return JSON.parse(r); - }); - failedItems = resultsInJSONFormat.filter(function (r) { - return r.success === false; - }); +// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored - if (failedItems.length > 0) { - throw new Errors_1.ImportError("".concat(resultsInJSONFormat.length - failedItems.length, " documents imported successfully, ").concat(failedItems.length, " documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."), resultsInJSONFormat); - } else { - return [2 - /*return*/ - , resultsInJSONFormat]; - } - } else { - return [2 - /*return*/ - , resultsInJSONLFormat]; - } - return [2 - /*return*/ - ]; - } - }); - }); - }; - /** - * Returns a JSONL string for all the documents in this collection - */ +/** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ +function isVisitable(thing) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(thing); +} +/** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ +function removeBrackets(key) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]') ? key.slice(0, -2) : key; +} - Documents.prototype["export"] = function (options) { - if (options === void 0) { - options = {}; - } +/** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ +function renderKey(path, key, dots) { + if (!path) return key; + return path.concat(key).map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }).join(dots ? '.' : ''); +} - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath("export"), options)]; - }); - }); - }; - /** - * Returns a NodeJS readable stream of JSONL for all the documents in this collection. - */ +/** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ +function isFlatArray(arr) { + return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(arr) && !arr.some(isVisitable); +} +const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"], {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); - Documents.prototype.exportStream = function (options) { - if (options === void 0) { - options = {}; - } +/** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath("export"), options, { - responseType: "stream" - })]; - }); - }); - }; +/** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ +function toFormData(obj, formData, options) { + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { + throw new TypeError('target must be an object'); + } - return Documents; -}(SearchOnlyDocuments_1.SearchOnlyDocuments); + // eslint-disable-next-line no-param-reassign + formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"] || FormData)(); -exports["default"] = Documents; + // eslint-disable-next-line no-param-reassign + options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(options, { + metaTokens: true, + dots: false, + indexes: false + }, false, function defined(option, source) { + // eslint-disable-next-line no-eq-null,eqeqeq + return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]); + }); -},{"./Errors":62,"./SearchOnlyDocuments":76}],76:[function(require,module,exports){ -"use strict"; + const metaTokens = options.metaTokens; + // eslint-disable-next-line no-use-before-define + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; + const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData); -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) { + throw new TypeError('visitor must be a function'); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } + function convertValue(value) { + if (value === null) return ''; - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isDate(value)) { + return value.toISOString(); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(value)) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"]('Blob is not supported. Use a Buffer instead.'); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isTypedArray(value)) { + return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); + } - function verb(n) { - return function (v) { - return step([n, v]); - }; + return value; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; - case 4: - _.label++; - return { - value: op[1], - done: false - }; + if (value && !path && typeof value === 'object') { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = JSON.stringify(value); + } else if ( + (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) || + ((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)) + )) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + arr.forEach(function each(el, index) { + !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), + convertValue(el) + ); + }); + return false; + } + } - case 7: - op = _.ops.pop(); + if (isVisitable(value)) { + return true; + } - _.trys.pop(); + formData.append(renderKey(path, key, dots), convertValue(value)); - continue; + return false; + } - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + const stack = []; - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + function build(value, path) { + if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(value)) return; - if (t && _.label < t[2]) { - _.label = t[2]; + if (stack.indexOf(value) !== -1) { + throw Error('Circular reference detected in ' + path.join('.')); + } - _.ops.push(op); + stack.push(value); - break; - } + _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) { + const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) && visitor.call( + formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers + ); - if (t[2]) _.ops.pop(); + if (result === true) { + build(el, path ? path.concat(key) : [key]); + } + }); - _.trys.pop(); + stack.pop(); + } - continue; - } + if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(obj)) { + throw new TypeError('data must be an object'); + } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } + build(obj); - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; + return formData; +} -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toFormData); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.SearchOnlyDocuments = void 0; -var RequestWithCache_1 = __importDefault(require("./RequestWithCache")); +/***/ }), -var Collections_1 = __importDefault(require("./Collections")); +/***/ "./node_modules/axios/lib/helpers/toURLEncodedForm.js": +/*!************************************************************!*\ + !*** ./node_modules/axios/lib/helpers/toURLEncodedForm.js ***! + \************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -var RESOURCEPATH = "/documents"; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ toURLEncodedForm) +/* harmony export */ }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js"); +/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js"); +/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js"); -var SearchOnlyDocuments = -/** @class */ -function () { - function SearchOnlyDocuments(collectionName, apiCall, configuration) { - this.collectionName = collectionName; - this.apiCall = apiCall; - this.configuration = configuration; - this.requestWithCache = new RequestWithCache_1["default"](); - } - SearchOnlyDocuments.prototype.clearCache = function () { - this.requestWithCache.clearCache(); - }; - SearchOnlyDocuments.prototype.search = function (searchParameters, _a) { - var _b = _a === void 0 ? {} : _a, - _c = _b.cacheSearchResultsForSeconds, - cacheSearchResultsForSeconds = _c === void 0 ? this.configuration.cacheSearchResultsForSeconds : _c, - _d = _b.abortSignal, - abortSignal = _d === void 0 ? null : _d; - return __awaiter(this, void 0, void 0, function () { - var additionalQueryParams, key, queryParams; - return __generator(this, function (_e) { - additionalQueryParams = {}; - if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; - } - for (key in searchParameters) { - if (Array.isArray(searchParameters[key])) { - additionalQueryParams[key] = searchParameters[key].join(","); - } - } +function toURLEncodedForm(data, options) { + return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].classes.URLSearchParams(), Object.assign({ + visitor: function(value, key, path, helpers) { + if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } - queryParams = Object.assign({}, searchParameters, additionalQueryParams); - return [2 - /*return*/ - , this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath("search"), queryParams, { - abortSignal: abortSignal - }], { - cacheResponseForSeconds: cacheSearchResultsForSeconds - })]; - }); - }); - }; + return helpers.defaultVisitor.apply(this, arguments); + } + }, options)); +} - SearchOnlyDocuments.prototype.endpointPath = function (operation) { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); - }; - Object.defineProperty(SearchOnlyDocuments, "RESOURCEPATH", { - get: function get() { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return SearchOnlyDocuments; -}(); +/***/ }), -exports.SearchOnlyDocuments = SearchOnlyDocuments; +/***/ "./node_modules/axios/lib/helpers/validator.js": +/*!*****************************************************!*\ + !*** ./node_modules/axios/lib/helpers/validator.js ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -},{"./Collections":47,"./RequestWithCache":73}],52:[function(require,module,exports){ "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _env_data_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../env/data.js */ "./node_modules/axios/lib/env/data.js"); +/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js"); -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - _extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); +const validators = {}; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { + validators[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; }; -}; - -Object.defineProperty(exports, "__esModule", { - value: true }); -var TypesenseError_1 = __importDefault(require("./TypesenseError")); +const deprecatedWarnings = {}; -var HTTPError = -/** @class */ -function (_super) { - __extends(HTTPError, _super); - - function HTTPError() { - return _super !== null && _super.apply(this, arguments) || this; +/** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ +validators.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + _env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); } - return HTTPError; -}(TypesenseError_1["default"]); - -exports["default"] = HTTPError; - -},{"./TypesenseError":61}],53:[function(require,module,exports){ -"use strict"; + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]( + formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), + _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_DEPRECATED + ); + } -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } - return _extendStatics(d, b); + return validator ? validator(value, opt, opts) : true; }; +}; - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); +/** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ - function __() { - this.constructor = d; +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object') { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('options must be an object', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('option ' + opt + ' must be ' + result, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE); + } + continue; + } + if (allowUnknown !== true) { + throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]('Unknown option ' + opt, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION); } + } +} - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + assertOptions, + validators +}); -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; -Object.defineProperty(exports, "__esModule", { - value: true -}); +/***/ }), -var TypesenseError_1 = __importDefault(require("./TypesenseError")); +/***/ "./node_modules/axios/lib/platform/browser/classes/Blob.js": +/*!*****************************************************************!*\ + !*** ./node_modules/axios/lib/platform/browser/classes/Blob.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -var ImportError = -/** @class */ -function (_super) { - __extends(ImportError, _super); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); - function ImportError(message, importResults) { - var _this = _super.call(this, message) || this; - _this.importResults = importResults; - return _this; - } +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof Blob !== 'undefined' ? Blob : null); - return ImportError; -}(TypesenseError_1["default"]); -exports["default"] = ImportError; +/***/ }), -},{"./TypesenseError":61}],54:[function(require,module,exports){ -"use strict"; +/***/ "./node_modules/axios/lib/platform/browser/classes/FormData.js": +/*!*********************************************************************!*\ + !*** ./node_modules/axios/lib/platform/browser/classes/FormData.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); - return _extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof FormData !== 'undefined' ? FormData : null); - _extendStatics(d, b); - function __() { - this.constructor = d; - } +/***/ }), - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); +/***/ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js": +/*!****************************************************************************!*\ + !*** ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ "./node_modules/axios/lib/helpers/AxiosURLSearchParams.js"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -var TypesenseError_1 = __importDefault(require("./TypesenseError")); -var MissingConfigurationError = -/** @class */ -function (_super) { - __extends(MissingConfigurationError, _super); +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"]); - function MissingConfigurationError() { - return _super !== null && _super.apply(this, arguments) || this; - } - return MissingConfigurationError; -}(TypesenseError_1["default"]); +/***/ }), -exports["default"] = MissingConfigurationError; +/***/ "./node_modules/axios/lib/platform/browser/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/axios/lib/platform/browser/index.js ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -},{"./TypesenseError":61}],55:[function(require,module,exports){ "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ "./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js"); +/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ "./node_modules/axios/lib/platform/browser/classes/FormData.js"); +/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ "./node_modules/axios/lib/platform/browser/classes/Blob.js"); -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - return _extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - _extendStatics(d, b); +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ +const isStandardBrowserEnv = (() => { + let product; + if (typeof navigator !== 'undefined' && ( + (product = navigator.product) === 'ReactNative' || + product === 'NativeScript' || + product === 'NS') + ) { + return false; + } - function __() { - this.constructor = d; - } + return typeof window !== 'undefined' && typeof document !== 'undefined'; +})(); - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); +/** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ + const isStandardBrowserWebWorkerEnv = (() => { + return ( + typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && + typeof self.importScripts === 'function' + ); +})(); -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; -Object.defineProperty(exports, "__esModule", { - value: true +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + isBrowser: true, + classes: { + URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"], + FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"], + Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"] + }, + isStandardBrowserEnv, + isStandardBrowserWebWorkerEnv, + protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] }); -var TypesenseError_1 = __importDefault(require("./TypesenseError")); -var ObjectAlreadyExists = -/** @class */ -function (_super) { - __extends(ObjectAlreadyExists, _super); +/***/ }), - function ObjectAlreadyExists() { - return _super !== null && _super.apply(this, arguments) || this; - } - - return ObjectAlreadyExists; -}(TypesenseError_1["default"]); - -exports["default"] = ObjectAlreadyExists; +/***/ "./node_modules/axios/lib/utils.js": +/*!*****************************************!*\ + !*** ./node_modules/axios/lib/utils.js ***! + \*****************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { -},{"./TypesenseError":61}],56:[function(require,module,exports){ "use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "./node_modules/axios/lib/helpers/bind.js"); -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - return _extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - _extendStatics(d, b); +// utils is a library of generic helper functions non-specific to axios - function __() { - this.constructor = d; - } +const {toString} = Object.prototype; +const {getPrototypeOf} = Object; - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); +const kindOf = (cache => thing => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(Object.create(null)); -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; +const kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type +} -Object.defineProperty(exports, "__esModule", { - value: true -}); +const typeOfTest = type => thing => typeof thing === type; -var TypesenseError_1 = __importDefault(require("./TypesenseError")); +/** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * + * @returns {boolean} True if value is an Array, otherwise false + */ +const {isArray} = Array; -var ObjectNotFound = -/** @class */ -function (_super) { - __extends(ObjectNotFound, _super); +/** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ +const isUndefined = typeOfTest('undefined'); - function ObjectNotFound() { - return _super !== null && _super.apply(this, arguments) || this; - } +/** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) + && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} - return ObjectNotFound; -}(TypesenseError_1["default"]); +/** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +const isArrayBuffer = kindOfTest('ArrayBuffer'); -exports["default"] = ObjectNotFound; -},{"./TypesenseError":61}],57:[function(require,module,exports){ -"use strict"; +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + let result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); + } + return result; +} -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; +/** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ +const isString = typeOfTest('string'); - return _extendStatics(d, b); - }; +/** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +const isFunction = typeOfTest('function'); - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +/** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ +const isNumber = typeOfTest('number'); - _extendStatics(d, b); +/** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ +const isObject = (thing) => thing !== null && typeof thing === 'object'; - function __() { - this.constructor = d; - } +/** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ +const isBoolean = thing => thing === true || thing === false; - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); +/** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ +const isPlainObject = (val) => { + if (kindOf(val) !== 'object') { + return false; + } -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; + const prototype = getPrototypeOf(val); + return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); +} -Object.defineProperty(exports, "__esModule", { - value: true -}); +/** + * Determine if a value is a Date + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Date, otherwise false + */ +const isDate = kindOfTest('Date'); -var TypesenseError_1 = __importDefault(require("./TypesenseError")); +/** + * Determine if a value is a File + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFile = kindOfTest('File'); -var ObjectUnprocessable = -/** @class */ -function (_super) { - __extends(ObjectUnprocessable, _super); +/** + * Determine if a value is a Blob + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false + */ +const isBlob = kindOfTest('Blob'); - function ObjectUnprocessable() { - return _super !== null && _super.apply(this, arguments) || this; - } +/** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFileList = kindOfTest('FileList'); - return ObjectUnprocessable; -}(TypesenseError_1["default"]); +/** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ +const isStream = (val) => isObject(val) && isFunction(val.pipe); -exports["default"] = ObjectUnprocessable; +/** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ +const isFormData = (thing) => { + let kind; + return thing && ( + (typeof FormData === 'function' && thing instanceof FormData) || ( + isFunction(thing.append) && ( + (kind = kindOf(thing)) === 'formdata' || + // detect form-data instance + (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') + ) + ) + ) +} -},{"./TypesenseError":61}],58:[function(require,module,exports){ -"use strict"; +/** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +const isURLSearchParams = kindOfTest('URLSearchParams'); -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ +const trim = (str) => str.trim ? + str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - return _extendStatics(d, b); - }; +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Boolean} [allOwnKeys = false] + * @returns {any} + */ +function forEach(obj, fn, {allOwnKeys = false} = {}) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + let i; + let l; - _extendStatics(d, b); + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } - function __() { - this.constructor = d; + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); } + } else { + // Iterate over object keys + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var TypesenseError_1 = __importDefault(require("./TypesenseError")); - -var RequestMalformed = -/** @class */ -function (_super) { - __extends(RequestMalformed, _super); - - function RequestMalformed() { - return _super !== null && _super.apply(this, arguments) || this; + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } } +} - return RequestMalformed; -}(TypesenseError_1["default"]); - -exports["default"] = RequestMalformed; - -},{"./TypesenseError":61}],59:[function(require,module,exports){ -"use strict"; - -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; +function findKey(obj, key) { + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; } + } + return null; +} - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); +const _global = (() => { + /*eslint no-undef:0*/ + if (typeof globalThis !== "undefined") return globalThis; + return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) +})(); -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; +const isContextDefined = (context) => !isUndefined(context) && context !== _global; -Object.defineProperty(exports, "__esModule", { - value: true -}); +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties + */ +function merge(/* obj1, obj2, obj3, ... */) { + const {caseless} = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = (val, key) => { + const targetKey = caseless && findKey(result, key) || key; + if (isPlainObject(result[targetKey]) && isPlainObject(val)) { + result[targetKey] = merge(result[targetKey], val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else { + result[targetKey] = val; + } + } -var TypesenseError_1 = __importDefault(require("./TypesenseError")); + for (let i = 0, l = arguments.length; i < l; i++) { + arguments[i] && forEach(arguments[i], assignValue); + } + return result; +} -var RequestUnauthorized = -/** @class */ -function (_super) { - __extends(RequestUnauthorized, _super); +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Boolean} [allOwnKeys] + * @returns {Object} The resulting value of object a + */ +const extend = (a, b, thisArg, {allOwnKeys}= {}) => { + forEach(b, (val, key) => { + if (thisArg && isFunction(val)) { + a[key] = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg); + } else { + a[key] = val; + } + }, {allOwnKeys}); + return a; +} - function RequestUnauthorized() { - return _super !== null && _super.apply(this, arguments) || this; +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ +const stripBOM = (content) => { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); } + return content; +} - return RequestUnauthorized; -}(TypesenseError_1["default"]); +/** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ +const inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + constructor.prototype.constructor = constructor; + Object.defineProperty(constructor, 'super', { + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); +} -exports["default"] = RequestUnauthorized; +/** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ +const toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; -},{"./TypesenseError":61}],60:[function(require,module,exports){ -"use strict"; + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; } - }; - - return _extendStatics(d, b); - }; + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + return destObj; +} - _extendStatics(d, b); +/** + * Determines whether a string ends with the characters of a specified string + * + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] + * + * @returns {boolean} + */ +const endsWith = (str, searchString, position) => { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +} - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); +/** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ +const toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!isNumber(i)) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; +} -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod +/** + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array + * + * @param {TypedArray} + * + * @returns {Array} + */ +// eslint-disable-next-line func-names +const isTypedArray = (TypedArray => { + // eslint-disable-next-line func-names + return thing => { + return TypedArray && thing instanceof TypedArray; }; -}; +})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); -Object.defineProperty(exports, "__esModule", { - value: true -}); +/** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ +const forEachEntry = (obj, fn) => { + const generator = obj && obj[Symbol.iterator]; -var TypesenseError_1 = __importDefault(require("./TypesenseError")); + const iterator = generator.call(obj); -var ServerError = -/** @class */ -function (_super) { - __extends(ServerError, _super); + let result; - function ServerError() { - return _super !== null && _super.apply(this, arguments) || this; + while ((result = iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); } +} - return ServerError; -}(TypesenseError_1["default"]); - -exports["default"] = ServerError; - -},{"./TypesenseError":61}],73:[function(require,module,exports){ -"use strict"; +/** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ +const matchAll = (regExp, str) => { + let matches; + const arr = []; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } + return arr; +} - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } +/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ +const isHTMLForm = kindOfTest('HTMLFormElement'); - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); +const toCamelCase = str => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, + function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + ); }; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +/* Creating a function that will check if an object has a property. */ +const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } +/** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ +const isRegExp = kindOfTest('RegExp'); - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } +const reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); - if (t && _.label < t[2]) { - _.label = t[2]; + Object.defineProperties(obj, reducedDescriptors); +} - _.ops.push(op); +/** + * Makes all methods read-only + * @param {Object} obj + */ - break; - } +const freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + // skip restricted props in strict mode + if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { + return false; + } - if (t[2]) _.ops.pop(); + const value = obj[name]; - _.trys.pop(); + if (!isFunction(value)) return; - continue; - } + descriptor.enumerable = false; - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } + if ('writable' in descriptor) { + descriptor.writable = false; + return; } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -var __spreadArray = void 0 && (void 0).__spreadArray || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; + if (!descriptor.set) { + descriptor.set = () => { + throw Error('Can not rewrite read-only method \'' + name + '\''); + }; } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; + }); +} -Object.defineProperty(exports, "__esModule", { - value: true -}); -var defaultCacheResponseForSeconds = 2 * 60; -var defaultMaxSize = 100; +const toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; -var RequestWithCache = -/** @class */ -function () { - function RequestWithCache() { - this.responseCache = new Map(); - this.responsePromiseCache = new Map(); + const define = (arr) => { + arr.forEach(value => { + obj[value] = true; + }); } - RequestWithCache.prototype.clearCache = function () { - this.responseCache = new Map(); - this.responsePromiseCache = new Map(); - }; // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); + return obj; +} - RequestWithCache.prototype.perform = function (requestContext, requestFunction, requestFunctionArguments, cacheOptions) { - return __awaiter(this, void 0, void 0, function () { - var _a, cacheResponseForSeconds, _b, maxSize, isCacheDisabled, requestFunctionArgumentsJSON, cacheEntry, now, isEntryValid, cachePromiseEntry, isEntryValid, responsePromise, response, isCacheOverMaxSize, oldestEntry, isResponsePromiseCacheOverMaxSize, oldestEntry; - - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - _a = cacheOptions.cacheResponseForSeconds, cacheResponseForSeconds = _a === void 0 ? defaultCacheResponseForSeconds : _a, _b = cacheOptions.maxSize, maxSize = _b === void 0 ? defaultMaxSize : _b; - isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0; - - if (isCacheDisabled) { - return [2 - /*return*/ - , requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false))]; - } - - requestFunctionArgumentsJSON = JSON.stringify(requestFunctionArguments); - cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON); - now = Date.now(); +const noop = () => {} - if (cacheEntry) { - isEntryValid = now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000; +const toFiniteNumber = (value, defaultValue) => { + value = +value; + return Number.isFinite(value) ? value : defaultValue; +} - if (isEntryValid) { - this.responseCache["delete"](requestFunctionArgumentsJSON); - this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry); - return [2 - /*return*/ - , Promise.resolve(cacheEntry.response)]; - } else { - this.responseCache["delete"](requestFunctionArgumentsJSON); - } - } +const ALPHA = 'abcdefghijklmnopqrstuvwxyz' - cachePromiseEntry = this.responsePromiseCache.get(requestFunctionArgumentsJSON); +const DIGIT = '0123456789'; - if (cachePromiseEntry) { - isEntryValid = now - cachePromiseEntry.requestTimestamp < cacheResponseForSeconds * 1000; +const ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT +} - if (isEntryValid) { - this.responsePromiseCache["delete"](requestFunctionArgumentsJSON); - this.responsePromiseCache.set(requestFunctionArgumentsJSON, cachePromiseEntry); - return [2 - /*return*/ - , cachePromiseEntry.responsePromise]; - } else { - this.responsePromiseCache["delete"](requestFunctionArgumentsJSON); - } - } +const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ''; + const {length} = alphabet; + while (size--) { + str += alphabet[Math.random() * length|0] + } - responsePromise = requestFunction.call.apply(requestFunction, __spreadArray([requestContext], requestFunctionArguments, false)); - this.responsePromiseCache.set(requestFunctionArgumentsJSON, { - requestTimestamp: now, - responsePromise: responsePromise - }); - return [4 - /*yield*/ - , responsePromise]; - - case 1: - response = _c.sent(); - this.responseCache.set(requestFunctionArgumentsJSON, { - requestTimestamp: now, - response: response - }); - isCacheOverMaxSize = this.responseCache.size > maxSize; - - if (isCacheOverMaxSize) { - oldestEntry = this.responseCache.keys().next().value; - this.responseCache["delete"](oldestEntry); - } + return str; +} - isResponsePromiseCacheOverMaxSize = this.responsePromiseCache.size > maxSize; +/** + * If the thing is a FormData object, return true, otherwise return false. + * + * @param {unknown} thing - The thing to check. + * + * @returns {boolean} + */ +function isSpecCompliantForm(thing) { + return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); +} - if (isResponsePromiseCacheOverMaxSize) { - oldestEntry = this.responsePromiseCache.keys().next().value; - this.responsePromiseCache["delete"](oldestEntry); - } +const toJSONObject = (obj) => { + const stack = new Array(10); - return [2 - /*return*/ - , response]; - } - }); - }); - }; + const visit = (source, i) => { - return RequestWithCache; -}(); + if (isObject(source)) { + if (stack.indexOf(source) >= 0) { + return; + } -exports["default"] = RequestWithCache; + if(!('toJSON' in source)) { + stack[i] = source; + const target = isArray(source) ? [] : {}; -},{}],75:[function(require,module,exports){ -"use strict"; + forEach(source, (value, key) => { + const reducedValue = visit(value, i + 1); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.SearchOnlyCollection = void 0; + stack[i] = undefined; -var SearchOnlyDocuments_1 = require("./SearchOnlyDocuments"); + return target; + } + } -var SearchOnlyCollection = -/** @class */ -function () { - function SearchOnlyCollection(name, apiCall, configuration) { - this.name = name; - this.apiCall = apiCall; - this.configuration = configuration; - this._documents = new SearchOnlyDocuments_1.SearchOnlyDocuments(this.name, this.apiCall, this.configuration); + return source; } - SearchOnlyCollection.prototype.documents = function () { - return this._documents; - }; - - return SearchOnlyCollection; -}(); + return visit(obj, 0); +} + +const isAsyncFn = kindOfTest('AsyncFunction'); + +const isThenable = (thing) => + thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isUndefined, + isDate, + isFile, + isBlob, + isRegExp, + isFunction, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + ALPHABET, + generateString, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable +}); -exports.SearchOnlyCollection = SearchOnlyCollection; -},{"./SearchOnlyDocuments":76}]},{},[38])(38) +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be in strict mode. +(() => { +"use strict"; +/*!**************************!*\ + !*** ./src/Typesense.ts ***! + \**************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Client: () => (/* reexport safe */ _Typesense_Client__WEBPACK_IMPORTED_MODULE_0__["default"]), +/* harmony export */ Errors: () => (/* reexport module object */ _Typesense_Errors__WEBPACK_IMPORTED_MODULE_2__), +/* harmony export */ SearchClient: () => (/* reexport safe */ _Typesense_SearchClient__WEBPACK_IMPORTED_MODULE_1__["default"]), +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Typesense_Client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Typesense/Client */ "./src/Typesense/Client.ts"); +/* harmony import */ var _Typesense_SearchClient__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Typesense/SearchClient */ "./src/Typesense/SearchClient.ts"); +/* harmony import */ var _Typesense_Errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Typesense/Errors */ "./src/Typesense/Errors/index.ts"); + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + Client: _Typesense_Client__WEBPACK_IMPORTED_MODULE_0__["default"], + SearchClient: _Typesense_SearchClient__WEBPACK_IMPORTED_MODULE_1__["default"], + Errors: _Typesense_Errors__WEBPACK_IMPORTED_MODULE_2__ }); +})(); +/******/ })() +; +//# sourceMappingURL=typesense.js.map \ No newline at end of file diff --git a/dist/typesense.js.map b/d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A;MAAA,OAAAF,QAAA;IAAA;EAAA;IAAAhB,GAAA;IAAAC,KAAA,EAED,SAAAa,aAAqB+B,SAAkB,EAAE;MACvC,UAAApB,MAAA,CAAUgM,oDAAW,CAAC/L,YAAY,OAAAD,MAAA,CAAI,IAAI,CAAC4N,cAAc,EAAA5N,MAAA,CACvDkO,QAAQ,CAACjO,YAAY,EAAAD,MAAA,CACpBoB,SAAS,KAAKH,SAAS,GAAG,EAAE,GAAG,GAAG,GAAGG,SAAS;IACnD;EAAC;IAAA7C,GAAA;IAAAa,GAAA,EAED,SAAAA,IAAA,EAAkC;MAChC,OAAOa,YAAY;IACrB;EAAC;EAAA,OAAAiO,QAAA;AAAA;;;;;;;;;;;AC1CH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAA0C;AAClD,QAAQ,oCAAO,UAAU;AAAA;AAAA;AAAA;AAAA,kGAAC;AAC1B,MAAM,KAAK,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qEAAqE;AACrE,YAAY;AACZ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qDAAqD;AACrD,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;ACxSD;;;;;;;;;;ACAA,cAAc,sGAAiC;AAC/C;AACA,gBAAgB;AAChB;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC/SjG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF;;AAEA,cAAc,mBAAO,CAAC,kGAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;ACde;AACf;AACA,yCAAyC,SAAS;AAClD;AACA;;;;;;;;;;;;;;;ACJe;AACf;AACA;;;;;;;;;;;;;;;;ACFqD;AACtC;AACf,iCAAiC,gEAAgB;AACjD;;;;;;;;;;;;;;;ACHe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AC7Be;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACJiD;AACoB;AACtD;AACf,MAAM,wEAAwB;AAC9B;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,iBAAiB,8DAAc;AAC/B;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AChB+C;AAC/C;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA,kCAAkC,6DAAa;AAC/C;AACA;AACe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACjB+C;AAChC;AACf,QAAQ,6DAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACde;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACLiD;AAClC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH,kBAAkB,8DAAc;AAChC;;;;;;;;;;;;;;;AChBe;AACf;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;ACNe;AACf;AACA;AACA;AACA;AACA,gFAAgF;AAChF;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;ACVe;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;;;ACFkC;AAC6B;AAChD;AACf,eAAe,sDAAO;AACtB;AACA,IAAI;AACJ;AACA;AACA,SAAS,qEAAqB;AAC9B;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACNiD;AACY;AACY;AACtB;AACpC;AACf,SAAS,8DAAc,SAAS,oEAAoB,YAAY,0EAA0B,YAAY,+DAAe;AACrH;;;;;;;;;;;;;;;;;;;ACNuD;AACJ;AACsB;AAClB;AACxC;AACf,SAAS,iEAAiB,SAAS,+DAAe,SAAS,0EAA0B,SAAS,iEAAiB;AAC/G;;;;;;;;;;;;;;;;ACNkC;AACnB;AACf,MAAM,sDAAO;AACb;AACA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ACZ;AACO;AACC;;AAEpD;AACA;AACA,uBAAuB,mEAAW;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,iEAAe;AACf;AACA;AACA,2BAA2B,6DAAY;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,QAAQ,iDAAK;AACb,UAAU,0DAAQ,yBAAyB,0DAAQ;AACnD,8CAA8C;AAC9C,QAAQ;AACR,8DAA8D;AAC9D,QAAQ,QAAQ,iDAAK;AACrB;AACA,sFAAsF;AACtF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,kEAAa;;AAElC,8CAA8C,gEAAQ;;AAEtD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6DAAY;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,2DAAM;AACZ;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,2DAAU,oBAAoB,2DAAU;;AAEzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,2DAAU,kBAAkB,2DAAU;;AAEvD;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD,iEAAoB;AACtE;AACA;AACA;AACA,iBAAiB,2DAAU;AAC3B;AACA,2CAA2C,2DAAU,aAAa,2DAAU;AAC5E;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,0DAAQ;AAChB;AACA;AACA,wBAAwB,uEAAe,uCAAuC,4DAAO;;AAErF;AACA;AACA;AACA;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ErC;;AAEA;AACA,iEAAe,KAAK;;;;;;;;;;;;;;;;;ACxFP;;AAEkC;;AAE/C;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,yDAAa;AACtC;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,WAAW,EAAC;;;;;;;;;;;;;;;;;;ACxHd;;AAEkC;AACf;;AAEhC;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA,EAAE,2DAAU,oDAAoD,2DAAU;AAC1E;AACA;;AAEA,iDAAK,yBAAyB,2DAAU;AACxC;AACA,CAAC;;AAED,iEAAe,aAAa,EAAC;;;;;;;;;;;;;;;;ACxBhB;;AAEE;AACf;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACJa;;AAEqB;AACY;AACW;AACN;AACR;AACI;AACC;AACH;;AAE7C,mBAAmB,6DAAS;;AAE5B;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,mBAAmB,8DAAkB;AACrC,oBAAoB,8DAAkB;AACtC;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,aAAa,2DAAW;;AAExB,WAAW,yCAAyC;;AAEpD;AACA,MAAM,6DAAS;AACf;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,UAAU,iDAAK;AACf;AACA;AACA;AACA,QAAQ;AACR,QAAQ,6DAAS;AACjB;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC,iDAAK;AACzC;AACA;AACA;;AAEA,eAAe,iDAAK;AACpB;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,wDAAY;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA,qBAAqB,2DAAe;AACpC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,2DAAe;AAC/B,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,2DAAW;AACxB,qBAAqB,6DAAa;AAClC,WAAW,gEAAQ;AACnB;AACA;;AAEA;AACA,iDAAK;AACL;AACA;AACA,wBAAwB,2DAAW,aAAa;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED,iDAAK;AACL;;AAEA;AACA;AACA,0BAA0B,2DAAW,aAAa;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED,iEAAe,KAAK,EAAC;;;;;;;;;;;;;;;;;ACxMR;;AAEmB;;AAEhC;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iDAAK;AACnB;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,kDAAkD,YAAY;;AAE9D;AACA;AACA;;AAEA,EAAE,iDAAK;AACP;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,iEAAe,UAAU,EAAC;;;;;;;;;;;;;;;;;;ACnGb;;AAEmB;AACsB;;AAEtD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS,iDAAK;AACd;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,MAAM,iDAAK;AACX;AACA;;AAEA;AACA;AACA;;AAEA,OAAO,iDAAK;;AAEZ,MAAM,iDAAK;AACX;AACA;;AAEA,MAAM,iDAAK;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,uBAAuB,iDAAK;;AAE5B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,iDAAK;;AAEvB;AACA;AACA;AACA;;AAEA;AACA,MAAM,iDAAK;;AAEX,QAAQ,iDAAK;AACb;AACA,MAAM,QAAQ,i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C;;AAED,iEAAe,QAAQ,EAAC;;;;;;;;;;;;;;;;AC9JX;;AAEb,iEAAe;AACf;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;ACNK;;;;;;;;;;;;;;;;ACAM;;AAE4B;;AAEzC;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA,YAAY,0DAAU;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA,iEAAe,oBAAoB,EAAC;;;;;;;;;;;;;;;;ACzDpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED,iEAAe,cAAc,EAAC;;;;;;;;;;;;;;;;ACtEjB;;AAEE;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACNa;;AAEmB;AACsC;;AAEtE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACe;AACf;AACA;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,MAAM,iDAAK,yBAAyB,iDAAK;AACzC;;AAEA,IAAI,iDAAK;AACT;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA,iEAAe,cAAc,EAAC;;;;;;;;;;;;;;;;AC3FjB;;AAEb;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACda;;AAEqB;;AAElC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACe;AACf,SAAS,iDAAK;AACd;;;;;;;;;;;;;;;;;;ACba;;AAEqB;AACU;;AAE5C,iEAAe,0DAAQ;;AAEvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA,sBAAsB,iDAAK;AAC3B;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG,EAAC;;;;;;;;;;;;;;;;AClEP;AACA,iEAAe,IAAI,EAAC;;;;;;;;;;;;;;;;;ACDP;;AAEqB;;AAElC;AACA;AACA,0BAA0B,iDAAK;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA,iEAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;ACtDW;;AAEE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;AACA,UAAU,0DAAQ,WAAW,iDAAK;AAClC;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;ACjBa;;AAE0B;AACQ;;AAE/C;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA,wBAAwB,iDAAO;AAC/B;;AAEA;AACA;AACA;AACA,gBAAgB,2DAAU;AAC1B;AACA,QAAQ,2DAAU;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA,cAAc,2DAAU,8BAA8B,2DAAU;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,2DAAU,yCAAyC,2DAAU;AAC/E;AACA;AACA;AACA;AACA,gBAAgB,2DAAU,0BAA0B,2DAAU;AAC9D;AACA;AACA;;AAEA,iEAAe;AACf;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;AC1FU;;AAEZ,iEAAe,yCAAyC;;;;;;;;;;;;;;;;ACF3C;;AAEb,iEAAe,iDAAiD,EAAC;;;;;;;;;;;;;;;;;ACFpD;;AAE+D;AAC5E,iEAAe,2DAA2D,wEAAoB,EAAC;;;;;;;;;;;;;;;;;;;ACHrC;AACd;AACR;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD,iEAAe;AACf;AACA;AACA,mBAAmB;AACnB,YAAY;AACZ,QAAQ;AACR,GAAG;AACH;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;;AC/DW;;AAEwB;;AAErC;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA,eAAe,4DAAI;AACnB,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;UCltBF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;ACNwC;AACY;AACP;AAEL;AACxC,iEAAe;EAAEvB,MAAM,EAANA,yDAAM;EAAEuK,YAAY,EAAZA,+DAAY;EAAES,MAAM,EAANA,8CAAMA;AAAC,CAAC,E","sources":["webpack://typesense/./src/Typesense/Alias.ts","webpack://typesense/./src/Typesense/Aliases.ts","webpack://typesense/./src/Typesense/Analytics.ts","webpack://typesense/./src/Typesense/AnalyticsRule.ts","webpack://typesense/./src/Typesense/AnalyticsRules.ts","webpack://typesense/./src/Typesense/ApiCall.ts","webpack://typesense/./src/Typesense/Client.ts","webpack://typesense/./src/Typesense/Collection.ts","webpack://typesense/./src/Typesense/Collections.ts","webpack://typesense/./src/Typesense/Configuration.ts","webpack://typesense/./src/Typesense/Debug.ts","webpack://typesense/./src/Typesense/Document.ts","webpack://typesense/./src/Typesense/Documents.ts","webpack://typesense/./src/Typesense/Errors/HTTPError.ts","webpack://typesense/./src/Typesense/Errors/ImportError.ts","webpack://typesense/./src/Typesense/Errors/MissingConfigurationError.ts","webpack://typesense/./src/Typesense/Errors/ObjectAlreadyExists.ts","webpack://typesense/./src/Typesense/Errors/ObjectNotFound.ts","webpack://typesense/./src/Typesense/Errors/ObjectUnprocessable.ts","webpack://typesense/./src/Typesense/Errors/RequestMalformed.ts","webpack://typesense/./src/Typesense/Errors/RequestUnauthorized.ts","webpack://typesense/./src/Typesense/Errors/ServerError.ts","webpack://typesense/./src/Typesense/Errors/TypesenseError.ts","webpack://typesense/./src/Typesense/Errors/index.ts","webpack://typesense/./src/Typesense/Health.ts","webpack://typesense/./src/Typesense/Key.ts","webpack://typesense/./src/Typesense/Keys.ts","webpack://typesense/./src/Typesense/Metrics.ts","webpack://typesense/./src/Typesense/MultiSearch.ts","webpack://typesense/./src/Typesense/Operations.ts","webpack://typesense/./src/Typesense/Override.ts","webpack://typesense/./src/Typesense/Overrides.ts","webpack://typesense/./src/Typesense/Preset.ts","webpack://typesense/./src/Typesense/Presets.ts","webpack://typesense/./src/Typesense/RequestWithCache.ts","webpack://typesense/./src/Typesense/SearchClient.ts","webpack://typesense/./src/Typesense/SearchOnlyCollection.ts","webpack://typesense/./src/Typesense/SearchOnlyDocuments.ts","webpack://typesense/./src/Typesense/Synonym.ts","webpack://typesense/./src/Typesense/Synonyms.ts","webpack://typesense/./node_modules/loglevel/lib/loglevel.js","webpack://typesense/ignored|/Users/jason/Programming/jprojs/typesense/typesense-js/src/Typesense|crypto","webpack://typesense/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://typesense/./node_modules/@babel/runtime/helpers/typeof.js","webpack://typesense/./node_modules/@babel/runtime/regenerator/index.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://typesense/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://typesense/./node_modules/axios/lib/adapters/adapters.js","webpack://typesense/./node_modules/axios/lib/adapters/xhr.js","webpack://typesense/./node_modules/axios/lib/axios.js","webpack://typesense/./node_modules/axios/lib/cancel/CancelToken.js","webpack://typesense/./node_modules/axios/lib/cancel/CanceledError.js","webpack://typesense/./node_modules/axios/lib/cancel/isCancel.js","webpack://typesense/./node_modules/axios/lib/core/Axios.js","webpack://typesense/./node_modules/axios/lib/core/AxiosError.js","webpack://typesense/./node_modules/axios/lib/core/AxiosHeaders.js","webpack://typesense/./node_modules/axios/lib/core/InterceptorManager.js","webpack://typesense/./node_modules/axios/lib/core/buildFullPath.js","webpack://typesense/./node_modules/axios/lib/core/dispatchRequest.js","webpack://typesense/./node_modules/axios/lib/core/mergeConfig.js","webpack://typesense/./node_modules/axios/lib/core/settle.js","webpack://typesense/./node_modules/axios/lib/core/transformData.js","webpack://typesense/./node_modules/axios/lib/defaults/index.js","webpack://typesense/./node_modules/axios/lib/defaults/transitional.js","webpack://typesense/./node_modules/axios/lib/env/data.js","webpack://typesense/./node_modules/axios/lib/helpers/AxiosURLSearchParams.js","webpack://typesense/./node_modules/axios/lib/helpers/HttpStatusCode.js","webpack://typesense/./node_modules/axios/lib/helpers/bind.js","webpack://typesense/./node_modules/axios/lib/helpers/buildURL.js","webpack://typesense/./node_modules/axios/lib/helpers/combineURLs.js","webpack://typesense/./node_modules/axios/lib/helpers/cookies.js","webpack://typesense/./node_modules/axios/lib/helpers/formDataToJSON.js","webpack://typesense/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://typesense/./node_modules/axios/lib/helpers/isAxiosError.js","webpack://typesense/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://typesense/./node_modules/axios/lib/helpers/null.js","webpack://typesense/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://typesense/./node_modules/axios/lib/helpers/parseProtocol.js","webpack://typesense/./node_modules/axios/lib/helpers/speedometer.js","webpack://typesense/./node_modules/axios/lib/helpers/spread.js","webpack://typesense/./node_modules/axios/lib/helpers/toFormData.js","webpack://typesense/./node_modules/axios/lib/helpers/toURLEncodedForm.js","webpack://typesense/./node_modules/axios/lib/helpers/validator.js","webpack://typesense/./node_modules/axios/lib/platform/browser/classes/Blob.js","webpack://typesense/./node_modules/axios/lib/platform/browser/classes/FormData.js","webpack://typesense/./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","webpack://typesense/./node_modules/axios/lib/platform/browser/index.js","webpack://typesense/./node_modules/axios/lib/utils.js","webpack://typesense/webpack/bootstrap","webpack://typesense/webpack/runtime/compat get default export","webpack://typesense/webpack/runtime/define property getters","webpack://typesense/webpack/runtime/hasOwnProperty shorthand","webpack://typesense/webpack/runtime/make namespace object","webpack://typesense/./src/Typesense.ts"],"sourcesContent":["import Aliases, { CollectionAliasSchema } from \"./Aliases\";\nimport ApiCall from \"./ApiCall\";\n\nexport default class Alias {\n constructor(private name: string, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Aliases.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/aliases\";\n\nexport interface CollectionAliasCreateSchema {\n collection_name: string;\n}\n\nexport interface CollectionAliasSchema extends CollectionAliasCreateSchema {\n name: string;\n}\n\nexport interface CollectionAliasesResponseSchema {\n aliases: CollectionAliasSchema[];\n}\n\nexport default class Aliases {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n name: string,\n mapping: CollectionAliasCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n mapping\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n private endpointPath(aliasName): string {\n return `${Aliases.RESOURCEPATH}/${aliasName}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport AnalyticsRules from \"./AnalyticsRules\";\nimport AnalyticsRule from \"./AnalyticsRule\";\n\nconst RESOURCEPATH = \"/analytics\";\n\nexport default class Analytics {\n private readonly _analyticsRules: AnalyticsRules;\n private readonly individualAnalyticsRules: Record = {};\n\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules(this.apiCall);\n }\n\n rules(id?: string): AnalyticsRules | AnalyticsRule {\n if (id === undefined) {\n return this._analyticsRules;\n } else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport AnalyticsRules from \"./AnalyticsRules\";\n\nexport interface AnalyticsRuleCreateSchema {\n type: \"popular_queries\";\n params: {\n source: {\n collections: string[];\n };\n destination: {\n collection: string;\n };\n limit: number;\n };\n}\n\nexport interface AnalyticsRuleDeleteSchema {\n name: string;\n}\n\nexport interface AnalyticsRuleSchema extends AnalyticsRuleCreateSchema {\n name: string;\n}\n\nexport default class AnalyticsRule {\n constructor(private name: string, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${AnalyticsRules.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport {\n AnalyticsRuleCreateSchema,\n AnalyticsRuleSchema,\n} from \"./AnalyticsRule\";\n\nexport interface AnalyticsRulesRetrieveSchema {\n rules: AnalyticsRuleSchema[];\n}\n\nconst RESOURCEPATH = \"/analytics/rules\";\n\nexport default class AnalyticsRules {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async upsert(\n name: string,\n params: AnalyticsRuleCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n params\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${AnalyticsRules.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import axios, { AxiosRequestConfig, AxiosResponse, Method } from \"axios\";\nimport { Logger } from \"loglevel\";\nimport {\n HTTPError,\n ObjectAlreadyExists,\n ObjectNotFound,\n ObjectUnprocessable,\n RequestMalformed,\n RequestUnauthorized,\n ServerError,\n} from \"./Errors\";\nimport TypesenseError from \"./Errors/TypesenseError\";\nimport Configuration, { NodeConfiguration } from \"./Configuration\";\n\nconst APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nconst HEALTHY = true;\nconst UNHEALTHY = false;\n\ninterface Node extends NodeConfiguration {\n isHealthy: boolean;\n index: string | number;\n}\n\nexport default class ApiCall {\n private readonly apiKey: string;\n private readonly nodes: Node[];\n private readonly nearestNode: Node;\n private readonly connectionTimeoutSeconds: number;\n private readonly healthcheckIntervalSeconds: number;\n private readonly retryIntervalSeconds: number;\n private readonly sendApiKeyAsQueryParam?: boolean;\n private readonly numRetriesPerRequest: number;\n private readonly additionalUserHeaders?: Record;\n\n private readonly logger: Logger;\n private currentNodeIndex: number;\n\n constructor(private configuration: Configuration) {\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n\n this.logger = this.configuration.logger;\n\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n\n async get(\n endpoint: string,\n queryParameters: any = {},\n {\n abortSignal = null,\n responseType = undefined,\n }: {\n abortSignal?: any;\n responseType?: AxiosRequestConfig[\"responseType\"] | undefined;\n } = {}\n ): Promise {\n return this.performRequest(\"get\", endpoint, {\n queryParameters,\n abortSignal,\n responseType,\n });\n }\n\n async delete(endpoint: string, queryParameters: any = {}): Promise {\n return this.performRequest(\"delete\", endpoint, { queryParameters });\n }\n\n async post(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n additionalHeaders: any = {}\n ): Promise {\n return this.performRequest(\"post\", endpoint, {\n queryParameters,\n bodyParameters,\n additionalHeaders,\n });\n }\n\n async put(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {}\n ): Promise {\n return this.performRequest(\"put\", endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async patch(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {}\n ): Promise {\n return this.performRequest(\"patch\", endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async performRequest(\n requestType: Method,\n endpoint: string,\n {\n queryParameters = null,\n bodyParameters = null,\n additionalHeaders = {},\n abortSignal = null,\n responseType = undefined,\n skipConnectionTimeout = false,\n }: {\n queryParameters?: any;\n bodyParameters?: any;\n additionalHeaders?: any;\n abortSignal?: any;\n responseType?: AxiosRequestConfig[\"responseType\"] | undefined;\n skipConnectionTimeout?: boolean;\n }\n ): Promise {\n this.configuration.validate();\n\n const requestNumber = Date.now();\n let lastException;\n this.logger.debug(\n `Request #${requestNumber}: Performing ${requestType.toUpperCase()} request: ${endpoint}`\n );\n for (\n let numTries = 1;\n numTries <= this.numRetriesPerRequest + 1;\n numTries++\n ) {\n const node = this.getNextNode(requestNumber);\n this.logger.debug(\n `Request #${requestNumber}: Attempting ${requestType.toUpperCase()} request Try #${numTries} to Node ${\n node.index\n }`\n );\n\n if (abortSignal && abortSignal.aborted) {\n return Promise.reject(new Error(\"Request aborted by caller.\"));\n }\n\n let abortListener;\n\n try {\n const requestOptions: AxiosRequestConfig = {\n method: requestType,\n url: this.uriFor(endpoint, node),\n headers: Object.assign(\n {},\n this.defaultHeaders(),\n additionalHeaders,\n this.additionalUserHeaders\n ),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType,\n validateStatus: (status) => {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n (data, headers) => {\n let transformedData = data;\n if (\n headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")\n ) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this.connectionTimeoutSeconds * 1000;\n }\n\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n\n if (this.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this.apiKey;\n }\n\n if (\n bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))\n ) {\n requestOptions.data = bodyParameters;\n }\n\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n const cancelToken = axios.CancelToken;\n const source = cancelToken.source();\n abortListener = () => source.cancel();\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source.token;\n }\n\n const response = await axios(requestOptions);\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this.setNodeHealthcheck(node, HEALTHY);\n }\n this.logger.debug(\n `Request #${requestNumber}: Request to Node ${node.index} was made. Response Code was ${response.status}.`\n );\n\n if (response.status >= 200 && response.status < 300) {\n // If response is 2xx return a resolved promise\n return Promise.resolve(response.data);\n } else if (response.status < 500) {\n // Next, if response is anything but 5xx, don't retry, return a custom error\n return Promise.reject(\n this.customErrorForResponse(response, response.data?.message)\n );\n } else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this.customErrorForResponse(response, response.data?.message);\n }\n } catch (error: any) {\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error;\n this.logger.warn(\n `Request #${requestNumber}: Request to Node ${\n node.index\n } failed due to \"${error.code} ${error.message}${\n error.response == null\n ? \"\"\n : \" - \" + JSON.stringify(error.response?.data)\n }\"`\n );\n // this.logger.debug(error.stack)\n this.logger.warn(\n `Request #${requestNumber}: Sleeping for ${this.retryIntervalSeconds}s and then retrying request...`\n );\n await this.timer(this.retryIntervalSeconds);\n } finally {\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n }\n }\n this.logger.debug(\n `Request #${requestNumber}: No retries left. Raising last error`\n );\n return Promise.reject(lastException);\n }\n\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n getNextNode(requestNumber = 0): Node {\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: Node ${\n this.nearestNode.index\n } is ${this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"}`\n );\n if (\n this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${this.nearestNode.index}`\n );\n return this.nearestNode;\n }\n this.logger.debug(\n `Request #${requestNumber}: Falling back to individual nodes`\n );\n }\n\n // Fallback to nodes as usual\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: ${this.nodes\n .map(\n (node) =>\n `Node ${node.index} is ${\n node.isHealthy === true ? \"Healthy\" : \"Unhealthy\"\n }`\n )\n .join(\" || \")}`\n );\n let candidateNode: Node = this.nodes[0];\n for (let i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (\n candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${candidateNode.index}`\n );\n return candidateNode;\n }\n }\n\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\n `Request #${requestNumber}: No healthy nodes were found. Returning the next node, Node ${candidateNode.index}`\n );\n return candidateNode;\n }\n\n nodeDueForHealthcheck(node, requestNumber = 0): boolean {\n const isDueForHealthcheck =\n Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\n `Request #${requestNumber}: Node ${node.index} has exceeded healtcheckIntervalSeconds of ${this.healthcheckIntervalSeconds}. Adding it back into rotation.`\n );\n }\n return isDueForHealthcheck;\n }\n\n initializeMetadataForNodes(): void {\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n\n this.nodes.forEach((node, i) => {\n node.index = i;\n this.setNodeHealthcheck(node, HEALTHY);\n });\n }\n\n setNodeHealthcheck(node, isHealthy): void {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n }\n\n uriFor(endpoint: string, node): string {\n if (node.url != null) {\n return `${node.url}${endpoint}`;\n }\n return `${node.protocol}://${node.host}:${node.port}${node.path}${endpoint}`;\n }\n\n defaultHeaders(): any {\n const defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n }\n\n async timer(seconds): Promise {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n }\n\n customErrorForResponse(\n response: AxiosResponse,\n messageFromServer: string\n ): TypesenseError {\n let errorMessage = `Request failed with HTTP code ${response.status}`;\n if (\n typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\"\n ) {\n errorMessage += ` | Server said: ${messageFromServer}`;\n }\n\n let error = new TypesenseError(errorMessage);\n\n if (response.status === 400) {\n error = new RequestMalformed(errorMessage);\n } else if (response.status === 401) {\n error = new RequestUnauthorized(errorMessage);\n } else if (response.status === 404) {\n error = new ObjectNotFound(errorMessage);\n } else if (response.status === 409) {\n error = new ObjectAlreadyExists(errorMessage);\n } else if (response.status === 422) {\n error = new ObjectUnprocessable(errorMessage);\n } else if (response.status >= 500 && response.status <= 599) {\n error = new ServerError(errorMessage);\n } else {\n error = new HTTPError(errorMessage);\n }\n\n error.httpStatus = response.status;\n\n return error;\n }\n}\n","/* eslint-disable no-dupe-class-members */\n\nimport Configuration, { ConfigurationOptions } from \"./Configuration\";\nimport ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Collection from \"./Collection\";\nimport Aliases from \"./Aliases\";\nimport Alias from \"./Alias\";\nimport Keys from \"./Keys\";\nimport Key from \"./Key\";\nimport Debug from \"./Debug\";\nimport Metrics from \"./Metrics\";\nimport Health from \"./Health\";\nimport Operations from \"./Operations\";\nimport MultiSearch from \"./MultiSearch\";\nimport Presets from \"./Presets\";\nimport Preset from \"./Preset\";\nimport Analytics from \"./Analytics\";\n\nexport default class Client {\n configuration: Configuration;\n apiCall: ApiCall;\n debug: Debug;\n metrics: Metrics;\n health: Health;\n operations: Operations;\n multiSearch: MultiSearch;\n analytics: Analytics;\n private readonly _collections: Collections;\n private readonly individualCollections: Record;\n private readonly _aliases: Aliases;\n private readonly individualAliases: Record;\n private readonly _keys: Keys;\n private readonly individualKeys: Record;\n private readonly _presets: Presets;\n private readonly individualPresets: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? false;\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.debug = new Debug(this.apiCall);\n this.metrics = new Metrics(this.apiCall);\n this.health = new Health(this.apiCall);\n this.operations = new Operations(this.apiCall);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration);\n this._collections = new Collections(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets(this.apiCall);\n this.individualPresets = {};\n this.analytics = new Analytics(this.apiCall);\n }\n\n collections(): Collections;\n collections = object>(\n collectionName: string\n ): Collection;\n collections(collectionName?: string): Collections | Collection {\n if (collectionName === undefined) {\n return this._collections;\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection(\n collectionName,\n this.apiCall,\n this.configuration\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n\n aliases(): Aliases;\n aliases(aliasName: string): Alias;\n aliases(aliasName?: string): Aliases | Alias {\n if (aliasName === undefined) {\n return this._aliases;\n } else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n }\n\n keys(): Keys;\n keys(id: number): Key;\n keys(id?: number): Keys | Key {\n if (id === undefined) {\n return this._keys;\n } else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n }\n\n presets(): Presets;\n presets(id: string): Preset;\n presets(id?: string): Presets | Preset {\n if (id === undefined) {\n return this._presets;\n } else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections, { CollectionCreateSchema } from \"./Collections\";\nimport Documents, { DocumentSchema } from \"./Documents\";\nimport { ObjectNotFound } from \"./Errors\";\nimport Overrides from \"./Overrides\";\nimport Override from \"./Override\";\nimport Synonyms from \"./Synonyms\";\nimport Synonym from \"./Synonym\";\nimport { Document } from \"./Document\";\n\nexport type FieldType =\n | \"string\"\n | \"int32\"\n | \"int64\"\n | \"float\"\n | \"bool\"\n | \"geopoint\"\n | \"geopoint[]\"\n | \"string[]\"\n | \"int32[]\"\n | \"int64[]\"\n | \"float[]\"\n | \"bool[]\"\n | \"object\"\n | \"object[]\"\n | \"auto\"\n | \"string*\";\n\nexport interface CollectionFieldSchema {\n name: string;\n type: FieldType;\n optional?: boolean;\n facet?: boolean;\n index?: boolean;\n sort?: boolean;\n locale?: string;\n infix?: boolean;\n num_dim?: number;\n [t: string]: unknown;\n}\n\nexport interface CollectionSchema extends CollectionCreateSchema {\n created_at: number;\n num_documents: number;\n num_memory_shards: number;\n}\n\nexport interface CollectionDropFieldSchema {\n name: string;\n drop: true;\n}\n\nexport interface CollectionUpdateSchema\n extends Partial> {\n fields?: (CollectionFieldSchema | CollectionDropFieldSchema)[];\n}\n\nexport default class Collection {\n private readonly _documents: Documents;\n private individualDocuments: Record> = {};\n private readonly _overrides: Overrides;\n private individualOverrides: Record = {};\n private readonly _synonyms: Synonyms;\n private individualSynonyms: Record = {};\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any\n ) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n\n this._documents = new Documents(\n this.name,\n this.apiCall,\n this.configuration\n );\n this._overrides = new Overrides(this.name, this.apiCall);\n this._synonyms = new Synonyms(this.name, this.apiCall);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async update(schema: CollectionUpdateSchema): Promise {\n return this.apiCall.patch(this.endpointPath(), schema);\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async exists(): Promise {\n try {\n await this.retrieve();\n return true;\n } catch (e) {\n if (e instanceof ObjectNotFound) return false;\n throw e;\n }\n }\n\n documents(): Documents;\n documents(documentId: string): Document;\n documents(documentId?: string): Document | Documents {\n if (!documentId) {\n return this._documents;\n } else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document(\n this.name,\n documentId,\n this.apiCall\n );\n }\n return this.individualDocuments[documentId];\n }\n }\n\n overrides(): Overrides;\n overrides(overrideId: string): Override;\n overrides(overrideId?: string): Overrides | Override {\n if (overrideId === undefined) {\n return this._overrides;\n } else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override(\n this.name,\n overrideId,\n this.apiCall\n );\n }\n return this.individualOverrides[overrideId];\n }\n }\n\n synonyms(): Synonyms;\n synonyms(synonymId: string): Synonym;\n synonyms(synonymId?: string): Synonyms | Synonym {\n if (synonymId === undefined) {\n return this._synonyms;\n } else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym(\n this.name,\n synonymId,\n this.apiCall\n );\n }\n return this.individualSynonyms[synonymId];\n }\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { CollectionFieldSchema, CollectionSchema } from \"./Collection\";\n\nexport interface CollectionCreateSchema {\n name: string;\n default_sorting_field?: string;\n fields?: CollectionFieldSchema[];\n symbols_to_index?: string[];\n token_separators?: string[];\n enable_nested_fields?: boolean;\n}\n\nexport interface CollectionCreateOptions {\n src_name?: string;\n}\n\nconst RESOURCEPATH = \"/collections\";\n\nexport default class Collections {\n constructor(private apiCall: ApiCall) {}\n\n async create(\n schema: CollectionCreateSchema,\n options: CollectionCreateOptions = {}\n ): Promise {\n return this.apiCall.post(RESOURCEPATH, schema, options);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import * as logger from \"loglevel\";\nimport { Logger, LogLevelDesc } from \"loglevel\";\nimport { MissingConfigurationError } from \"./Errors\";\n\nexport interface NodeConfiguration {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n url?: string;\n}\n\nexport interface NodeConfigurationWithHostname {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n}\n\nexport interface NodeConfigurationWithUrl {\n url: string;\n}\n\nexport interface ConfigurationOptions {\n apiKey: string;\n nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n randomizeNodes?: boolean;\n /**\n * @deprecated\n * masterNode is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n masterNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n /**\n * @deprecated\n * readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n readReplicaNodes?:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n connectionTimeoutSeconds?: number;\n timeoutSeconds?: number;\n healthcheckIntervalSeconds?: number;\n numRetries?: number;\n retryIntervalSeconds?: number;\n sendApiKeyAsQueryParam?: boolean | undefined;\n useServerSideSearchCache?: boolean;\n cacheSearchResultsForSeconds?: number;\n additionalHeaders?: Record;\n\n logLevel?: LogLevelDesc;\n logger?: Logger;\n}\n\nexport default class Configuration {\n readonly nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n readonly nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n readonly connectionTimeoutSeconds: number;\n readonly healthcheckIntervalSeconds: number;\n readonly numRetries: number;\n readonly retryIntervalSeconds: number;\n readonly apiKey: string;\n readonly sendApiKeyAsQueryParam?: boolean;\n readonly cacheSearchResultsForSeconds: number;\n readonly useServerSideSearchCache: boolean;\n readonly logger: Logger;\n readonly logLevel: LogLevelDesc;\n readonly additionalHeaders?: Record;\n\n constructor(options: ConfigurationOptions) {\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map((node) => this.setDefaultPathInNode(node))\n .map((node) => this.setDefaultPortInNode(node))\n .map((node) => ({ ...node })) as NodeConfiguration[]; // Make a deep copy\n\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n\n this.additionalHeaders = options.additionalHeaders;\n\n this.showDeprecationWarnings(options);\n this.validate();\n }\n\n validate(): boolean {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new MissingConfigurationError(\n \"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\"\n );\n }\n\n if (\n this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)\n ) {\n throw new MissingConfigurationError(\n \"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\"\n );\n }\n\n if (this.apiKey == null) {\n throw new MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n\n return true;\n }\n\n private validateNodes(): boolean {\n return this.nodes.some((node) => {\n return this.isNodeMissingAnyParameters(node);\n });\n }\n\n private isNodeMissingAnyParameters(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n ): boolean {\n return (\n ![\"protocol\", \"host\", \"port\", \"path\"].every((key) => {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null\n );\n }\n\n private setDefaultPathInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n }\n\n private setDefaultPortInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (\n node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")\n ) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n }\n\n private showDeprecationWarnings(options: ConfigurationOptions): void {\n if (options.timeoutSeconds) {\n this.logger.warn(\n \"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\"\n );\n }\n if (options.masterNode) {\n this.logger.warn(\n \"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\"\n );\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\n \"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\"\n );\n }\n }\n\n private shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [array[i], array[j]] = [array[j], array[i]];\n }\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/debug\";\n\nexport interface DebugResponseSchema {\n state: number;\n version: string;\n}\n\nexport default class Debug {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Documents, {\n DocumentSchema,\n DocumentWriteParameters,\n} from \"./Documents\";\n\nexport class Document {\n constructor(\n private collectionName: string,\n private documentId: string,\n private apiCall: ApiCall\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async update(\n partialDocument: Partial,\n options: DocumentWriteParameters = {}\n ): Promise {\n return this.apiCall.patch(this.endpointPath(), partialDocument, options);\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Documents.RESOURCEPATH}/${this.documentId}`;\n }\n}\n","import type { ReadStream } from \"fs\";\nimport ApiCall from \"./ApiCall\";\nimport Configuration from \"./Configuration\";\nimport { ImportError } from \"./Errors\";\nimport { SearchOnlyDocuments } from \"./SearchOnlyDocuments\";\n\n// Todo: use generic to extract filter_by values\nexport interface DeleteQuery {\n filter_by: string;\n batch_size?: number;\n}\n\nexport interface DeleteResponse {\n num_deleted: number;\n}\n\ninterface ImportResponseSuccess {\n success: true;\n}\n\nexport interface ImportResponseFail {\n success: false;\n error: string;\n document: DocumentSchema;\n code: number;\n}\n\nexport type ImportResponse = ImportResponseSuccess | ImportResponseFail;\n\nexport type DocumentSchema = Record;\n\nexport interface SearchParamsWithPreset extends Partial {\n preset: string;\n}\n\ntype OperationMode = \"off\" | \"always\" | \"fallback\";\nexport interface SearchParams {\n // From https://typesense.org/docs/latest/api/documents.html#arguments\n q: string;\n query_by: string | string[];\n query_by_weights?: string | number[];\n prefix?: string | boolean | boolean[]; // default: true\n filter_by?: string;\n sort_by?: string | string[]; // default: text match desc\n facet_by?: string | string[];\n max_facet_values?: number;\n facet_query?: string;\n facet_query_num_typos?: number;\n page?: number; // default: 1\n per_page?: number; // default: 10, max 250\n group_by?: string | string[];\n group_limit?: number; // default:\n include_fields?: string | string[];\n exclude_fields?: string | string[];\n highlight_fields?: string | string[]; // default: all queried fields\n highlight_full_fields?: string | string[]; // default: all fields\n highlight_affix_num_tokens?: number; // default: 4\n highlight_start_tag?: string; // default: \n highlight_end_tag?: string; // default: \n snippet_threshold?: number; // default: 30\n num_typos?: string | number | number[]; // default: 2\n min_len_1typo?: number;\n min_len_2typo?: number;\n split_join_tokens?: OperationMode;\n exhaustive_search?: boolean;\n drop_tokens_threshold?: number; // default: 10\n typo_tokens_threshold?: number; // default: 100\n pinned_hits?: string | string[];\n hidden_hits?: string | string[];\n limit_hits?: number; // default: no limit\n pre_segmented_query?: boolean;\n enable_overrides?: boolean;\n prioritize_exact_match?: boolean; // default: true\n prioritize_token_position?: boolean;\n search_cutoff_ms?: number;\n use_cache?: boolean;\n max_candidates?: number;\n infix?: OperationMode | OperationMode[];\n preset?: string;\n text_match_type?: \"max_score\" | \"max_weight\";\n vector_query?: string;\n \"x-typesense-api-key\"?: string;\n \"x-typesense-user-id\"?: string;\n offset?: number;\n limit?: number;\n}\n\ntype SearchResponseHighlightObject = {\n matched_tokens?: string[];\n snippet?: string;\n value?: string;\n};\n\nexport type SearchResponseHighlight = T extends string | number\n ? SearchResponseHighlightObject\n : {\n [TAttribute in keyof T]?: SearchResponseHighlight;\n };\n\nexport interface SearchResponseHit {\n curated?: true;\n highlights?: [\n {\n field: keyof T;\n snippet?: string;\n value?: string;\n snippets?: string[];\n indices?: number[];\n matched_tokens: string[][] | string[];\n }\n ];\n highlight: SearchResponseHighlight;\n document: T;\n text_match: number;\n text_match_info?: {\n best_field_score: string; // To prevent scores from being truncated by JSON spec\n best_field_weight: number;\n fields_matched: number;\n score: string; // To prevent scores from being truncated by JSON spec\n tokens_matched: number;\n };\n}\n\nexport interface SearchResponseFacetCountSchema {\n counts: {\n count: number;\n highlighted: string;\n value: string;\n }[];\n field_name: keyof T;\n stats: {\n avg?: number;\n max?: number;\n min?: number;\n sum?: number;\n };\n}\n\nexport interface SearchResponseRequestParams extends Partial {\n collection_name?: string;\n}\n\n// Todo: we could infer whether this is a grouped response by adding the search params as a generic\nexport interface SearchResponse {\n facet_counts?: SearchResponseFacetCountSchema[];\n found: number;\n found_docs?: number;\n out_of: number;\n page: number;\n request_params: SearchResponseRequestParams;\n search_time_ms: number;\n hits?: SearchResponseHit[];\n grouped_hits?: {\n group_key: string[];\n hits: SearchResponseHit[];\n found?: number;\n }[];\n}\n\nexport interface DocumentWriteParameters {\n dirty_values?: \"coerce_or_reject\" | \"coerce_or_drop\" | \"drop\" | \"reject\";\n action?: \"create\" | \"update\" | \"upsert\" | \"emplace\";\n}\n\nexport interface UpdateByFilterParameters {\n filter_by?: string;\n}\n\nexport interface UpdateByFilterResponse {\n num_updated: number;\n}\n\nexport interface DocumentImportParameters extends DocumentWriteParameters {\n batch_size?: number;\n return_doc?: boolean;\n return_id?: boolean;\n}\n\nexport interface DocumentsExportParameters {\n filter_by?: string;\n include_fields?: string;\n exclude_fields?: string;\n}\n\nexport interface SearchableDocuments {\n search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n options: SearchOptions\n ): Promise>;\n clearCache(): void;\n}\n\nexport interface WriteableDocuments {\n create(document: T, options: DocumentWriteParameters): Promise;\n upsert(document: T, options: DocumentWriteParameters): Promise;\n update(document: T, options: DocumentWriteParameters): Promise;\n delete(idOrQuery: string | DeleteQuery): Promise | Promise;\n import(\n documents: T[] | string,\n options: DocumentWriteParameters\n ): Promise;\n export(options: DocumentsExportParameters): Promise;\n}\n\nexport interface SearchOptions {\n cacheSearchResultsForSeconds?: number;\n abortSignal?: AbortSignal | null;\n}\n\nexport default class Documents\n extends SearchOnlyDocuments\n implements WriteableDocuments\n{\n constructor(\n collectionName: string,\n apiCall: ApiCall,\n configuration: Configuration\n ) {\n super(collectionName, apiCall, configuration);\n }\n\n async create(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error(\"No document provided\");\n return this.apiCall.post(this.endpointPath(), document, options);\n }\n\n async upsert(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error(\"No document provided\");\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: \"upsert\" })\n );\n }\n\n async update(\n document: T,\n options: UpdateByFilterParameters\n ): Promise;\n async update(document: T, options: DocumentWriteParameters): Promise;\n async update(\n document: T,\n options: DocumentWriteParameters | UpdateByFilterParameters = {}\n ): Promise {\n if (!document) throw new Error(\"No document provided\");\n\n if (options[\"filter_by\"] != null) {\n return this.apiCall.patch(\n this.endpointPath(),\n document,\n Object.assign({}, options)\n );\n } else {\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: \"update\" })\n );\n }\n }\n\n async delete(idOrQuery: DeleteQuery): Promise;\n async delete(idOrQuery: string): Promise;\n async delete(\n idOrQuery: string | DeleteQuery = {} as DeleteQuery\n ): Promise {\n if (typeof idOrQuery === \"string\") {\n return this.apiCall.delete(this.endpointPath(idOrQuery), idOrQuery);\n } else {\n return this.apiCall.delete(\n this.endpointPath(),\n idOrQuery\n );\n }\n }\n\n async createMany(documents: T[], options: DocumentImportParameters = {}) {\n this.configuration.logger.warn(\n \"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\"\n );\n return this.import(documents, options);\n }\n\n /**\n * Import a set of documents in a batch.\n * @param {string|Array} documents - Can be a JSONL string of documents or an array of document objects.\n * @param options\n * @return {string|Array} Returns a JSONL string if the input was a JSONL string, otherwise it returns an array of results.\n */\n async import(\n documents: string,\n options?: DocumentImportParameters\n ): Promise;\n async import(\n documents: T[],\n options?: DocumentImportParameters\n ): Promise;\n async import(\n documents: T[] | string,\n options: DocumentImportParameters = {}\n ): Promise {\n let documentsInJSONLFormat;\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map((document) => JSON.stringify(document))\n .join(\"\\n\");\n } catch (error: any) {\n // if rangeerror, throw custom error message\n if (\n RangeError instanceof error &&\n error?.includes(\"Too many properties to enumerate\")\n ) {\n throw new Error(`${error}\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n `);\n }\n\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n } else {\n documentsInJSONLFormat = documents;\n }\n\n const resultsInJSONLFormat = await this.apiCall.performRequest(\n \"post\",\n this.endpointPath(\"import\"),\n {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n }\n );\n\n if (Array.isArray(documents)) {\n const resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map((r) => JSON.parse(r)) as ImportResponse[];\n const failedItems = resultsInJSONFormat.filter(\n (r) => r.success === false\n );\n if (failedItems.length > 0) {\n throw new ImportError(\n `${\n resultsInJSONFormat.length - failedItems.length\n } documents imported successfully, ${\n failedItems.length\n } documents failed during import. Use \\`error.importResults\\` from the raised exception to get a detailed error reason for each document.`,\n resultsInJSONFormat\n );\n } else {\n return resultsInJSONFormat;\n }\n } else {\n return resultsInJSONLFormat as string;\n }\n }\n\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n async export(options: DocumentsExportParameters = {}): Promise {\n return this.apiCall.get(this.endpointPath(\"export\"), options);\n }\n\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n async exportStream(\n options: DocumentsExportParameters = {}\n ): Promise {\n return this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n });\n }\n}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class HTTPError extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\nimport { ImportResponseFail } from \"../Documents\";\n\nexport default class ImportError extends TypesenseError {\n importResults: ImportResponseFail;\n constructor(message, importResults) {\n super(message);\n this.importResults = importResults;\n }\n}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class MissingConfigurationError extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ObjectAlreadyExists extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ObjectNotFound extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ObjectUnprocessable extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class RequestMalformed extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class RequestUnauthorized extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ServerError extends TypesenseError {}\n","export default class TypesenseError extends Error {\n httpStatus?: number;\n\n // Source: https://stackoverflow.com/a/58417721/123545\n constructor(message?: string) {\n super(message);\n this.name = new.target.name;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n","import HTTPError from \"./HTTPError\";\nimport MissingConfigurationError from \"./MissingConfigurationError\";\nimport ObjectAlreadyExists from \"./ObjectAlreadyExists\";\nimport ObjectNotFound from \"./ObjectNotFound\";\nimport ObjectUnprocessable from \"./ObjectUnprocessable\";\nimport RequestMalformed from \"./RequestMalformed\";\nimport RequestUnauthorized from \"./RequestUnauthorized\";\nimport ServerError from \"./ServerError\";\nimport ImportError from \"./ImportError\";\nimport TypesenseError from \"./TypesenseError\";\n\nexport {\n HTTPError,\n MissingConfigurationError,\n ObjectAlreadyExists,\n ObjectNotFound,\n ObjectUnprocessable,\n RequestMalformed,\n RequestUnauthorized,\n ServerError,\n TypesenseError,\n ImportError,\n};\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/health\";\n\nexport interface HealthResponse {\n ok: boolean;\n}\n\nexport default class Health {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Keys from \"./Keys\";\n\nexport interface KeyCreateSchema {\n actions: string[];\n collections: string[];\n description?: string;\n value?: string;\n value_prefix?: string;\n expires_at?: number;\n}\n\nexport interface KeyDeleteSchema {\n id: number;\n}\n\nexport interface KeySchema extends KeyCreateSchema {\n id: number;\n}\n\nexport default class Key {\n constructor(private id: number, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Keys.RESOURCEPATH}/${this.id}`;\n }\n}\n","import { createHmac } from \"crypto\";\nimport ApiCall from \"./ApiCall\";\nimport { KeyCreateSchema, KeySchema } from \"./Key\";\nimport { SearchParams } from \"./Documents\";\n\nconst RESOURCEPATH = \"/keys\";\n\nexport interface KeysRetrieveSchema {\n keys: KeySchema[];\n}\n\nexport interface GenerateScopedSearchKeyParams extends Partial {\n expires_at?: number;\n cache_ttl?: number;\n limit_multi_searches?: number;\n}\n\nexport default class Keys {\n constructor(private apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(params: KeyCreateSchema): Promise {\n return this.apiCall.post(Keys.RESOURCEPATH, params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n generateScopedSearchKey(\n searchKey: string,\n parameters: GenerateScopedSearchKeyParams\n ): string {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n const paramsJSON = JSON.stringify(parameters);\n const digest = Buffer.from(\n createHmac(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\")\n );\n const keyPrefix = searchKey.substr(0, 4);\n const rawScopedKey = `${digest}${keyPrefix}${paramsJSON}`;\n\n return Buffer.from(rawScopedKey).toString(\"base64\");\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/metrics.json\";\n\nexport interface MetricsResponse {\n system_cpu1_active_percentage: string;\n system_cpu2_active_percentage: string;\n system_cpu3_active_percentage: string;\n system_cpu4_active_percentage: string;\n system_cpu_active_percentage: string;\n system_disk_total_bytes: string;\n system_disk_used_bytes: string;\n system_memory_total_bytes: string;\n system_memory_used_bytes: string;\n system_network_received_bytes: string;\n system_network_sent_bytes: string;\n typesense_memory_active_bytes: string;\n typesense_memory_allocated_bytes: string;\n typesense_memory_fragmentation_ratio: string;\n typesense_memory_mapped_bytes: string;\n typesense_memory_metadata_bytes: string;\n typesense_memory_resident_bytes: string;\n typesense_memory_retained_bytes: string;\n}\n\nexport default class Metrics {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Configuration from \"./Configuration\";\nimport RequestWithCache from \"./RequestWithCache\";\nimport {\n DocumentSchema,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from \"./Documents\";\n\nconst RESOURCEPATH = \"/multi_search\";\n\nexport interface MultiSearchRequestSchema extends SearchParams {\n collection?: string;\n \"x-typesense-api-key\"?: string;\n}\n\nexport interface MultiSearchRequestWithPresetSchema\n extends SearchParamsWithPreset {\n collection?: string;\n \"x-typesense-api-key\"?: string;\n}\n\nexport interface MultiSearchRequestsSchema {\n searches: (MultiSearchRequestSchema | MultiSearchRequestWithPresetSchema)[];\n}\n\nexport interface MultiSearchResponse {\n results: { [Index in keyof T]: SearchResponse } & {\n length: T[\"length\"];\n };\n}\n\nexport default class MultiSearch {\n private requestWithCache: RequestWithCache;\n\n constructor(\n private apiCall: ApiCall,\n private configuration: Configuration,\n private useTextContentType: boolean = false\n ) {\n this.requestWithCache = new RequestWithCache();\n }\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async perform(\n searchRequests: MultiSearchRequestsSchema,\n commonParams: Partial = {},\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n }: { cacheSearchResultsForSeconds?: number } = {}\n ): Promise> {\n const additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n const queryParams = Object.assign({}, commonParams, additionalQueryParams);\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.post,\n [RESOURCEPATH, searchRequests, queryParams, additionalHeaders],\n { cacheResponseForSeconds: cacheSearchResultsForSeconds }\n ) as Promise>;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/operations\";\n\nexport default class Operations {\n constructor(private apiCall: ApiCall) {}\n\n async perform(\n operationName: \"vote\" | \"snapshot\" | \"cache/clear\" | string,\n queryParameters: Record = {}\n ): Promise {\n return this.apiCall.post(\n `${RESOURCEPATH}/${operationName}`,\n {},\n queryParameters\n );\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Overrides, { OverrideCreateSchema } from \"./Overrides\";\n\nexport interface OverrideSchema extends OverrideCreateSchema {\n id: string;\n}\n\nexport interface OverrideDeleteSchema {\n id: string;\n}\n\nexport default class Override {\n constructor(\n private collectionName: string,\n private overrideId: string,\n private apiCall: ApiCall\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Overrides.RESOURCEPATH}/${this.overrideId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport { OverrideSchema } from \"./Override\";\n\nconst RESOURCEPATH = \"/overrides\";\n\nexport interface OverrideRuleQuerySchema {\n query: string;\n match: \"exact\" | \"contains\";\n}\n\nexport interface OverrideRuleFilterSchema {\n filter_by: string;\n}\n\nexport interface OverrideCreateSchema {\n rule: OverrideRuleQuerySchema | OverrideRuleFilterSchema;\n filter_by?: string;\n sort_by?: string;\n remove_matched_tokens?: boolean;\n replace_query?: string;\n includes?: Array<{\n id: string;\n position: number;\n }>;\n excludes?: Array<{ id: string }>;\n filter_curated_hits?: boolean;\n effective_from_ts?: number;\n effective_to_ts?: number;\n stop_processing?: boolean;\n}\n\nexport interface OverridesRetrieveSchema {\n overrides: OverrideSchema[];\n}\n\nexport default class Overrides {\n constructor(private collectionName: string, private apiCall: ApiCall) {}\n\n async upsert(\n overrideId: string,\n params: OverrideCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(overrideId),\n params\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Overrides.RESOURCEPATH\n }${operation === undefined ? \"\" : \"/\" + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Presets, { PresetCreateSchema } from \"./Presets\";\n\nexport interface PresetSchema extends PresetCreateSchema {\n id: string;\n}\n\nexport interface PresetDeleteSchema {\n id: string;\n}\n\nexport default class Preset {\n constructor(private presetId: string, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Presets.RESOURCEPATH}/${this.presetId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { PresetSchema } from \"./Preset\";\nimport { SearchParams } from \"./Documents\";\nimport { MultiSearchRequestsSchema } from \"./MultiSearch\";\n\nconst RESOURCEPATH = \"/presets\";\n\nexport interface PresetCreateSchema {\n value: SearchParams | MultiSearchRequestsSchema;\n}\n\nexport interface PresetsRetrieveSchema {\n presets: PresetSchema[];\n}\n\nexport default class Presets {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n presetId: string,\n params: PresetCreateSchema\n ): Promise {\n return this.apiCall.put(this.endpointPath(presetId), params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Presets.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","const defaultCacheResponseForSeconds = 2 * 60;\nconst defaultMaxSize = 100;\n\nexport default class RequestWithCache {\n private responseCache: Map = new Map();\n private responsePromiseCache: Map = new Map();\n\n clearCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n async perform(\n requestContext: any,\n requestFunction: (...params: any) => unknown,\n requestFunctionArguments: any[],\n cacheOptions: CacheOptions\n ): Promise {\n const {\n cacheResponseForSeconds = defaultCacheResponseForSeconds,\n maxSize = defaultMaxSize,\n } = cacheOptions;\n const isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n\n if (isCacheDisabled) {\n return requestFunction.call(requestContext, ...requestFunctionArguments);\n }\n\n const requestFunctionArgumentsJSON = JSON.stringify(\n requestFunctionArguments\n );\n const cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n const now = Date.now();\n\n if (cacheEntry) {\n const isEntryValid =\n now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return Promise.resolve(cacheEntry.response);\n } else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const cachePromiseEntry = this.responsePromiseCache.get(\n requestFunctionArgumentsJSON\n );\n\n if (cachePromiseEntry) {\n const isEntryValid =\n now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(\n requestFunctionArgumentsJSON,\n cachePromiseEntry\n );\n return cachePromiseEntry.responsePromise;\n } else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const responsePromise = requestFunction.call(\n requestContext,\n ...requestFunctionArguments\n );\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise,\n });\n\n const response = await responsePromise;\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response,\n });\n\n const isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n const oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n const isResponsePromiseCacheOverMaxSize =\n this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n const oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return response as T;\n }\n}\n\ninterface CacheOptions {\n cacheResponseForSeconds?: number;\n maxSize?: number;\n}\n","import Configuration, { ConfigurationOptions } from \"./Configuration\";\nimport ApiCall from \"./ApiCall\";\nimport MultiSearch from \"./MultiSearch\";\nimport { DocumentSchema } from \"./Documents\";\nimport { SearchOnlyCollection } from \"./SearchOnlyCollection\";\n\nexport default class SearchClient {\n public readonly multiSearch: MultiSearch;\n private readonly configuration: Configuration;\n private readonly apiCall: ApiCall;\n private readonly individualCollections: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? true;\n if (\n options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000\n ) {\n console.warn(\n \"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\"\n );\n options.sendApiKeyAsQueryParam = false;\n }\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n\n clearCache() {\n this.multiSearch.clearCache();\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(([_, collection]) => {\n collection.documents().clearCache();\n });\n }\n\n collections(\n collectionName: string\n ): SearchOnlyCollection | SearchOnlyCollection {\n if (!collectionName) {\n throw new Error(\n \"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\"\n );\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection(\n collectionName,\n this.apiCall,\n this.configuration\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n}\n","import { DocumentSchema, SearchableDocuments } from \"./Documents\";\nimport ApiCall from \"./ApiCall\";\nimport { SearchOnlyDocuments } from \"./SearchOnlyDocuments\";\n\nexport class SearchOnlyCollection {\n private readonly _documents: SearchableDocuments;\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any\n ) {\n this._documents = new SearchOnlyDocuments(\n this.name,\n this.apiCall,\n this.configuration\n );\n }\n\n documents(): SearchableDocuments {\n return this._documents;\n }\n}\n","import RequestWithCache from \"./RequestWithCache\";\nimport ApiCall from \"./ApiCall\";\nimport Configuration from \"./Configuration\";\nimport Collections from \"./Collections\";\nimport type {\n DocumentSchema,\n SearchableDocuments,\n SearchOptions,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from \"./Documents\";\n\nconst RESOURCEPATH = \"/documents\";\n\nexport class SearchOnlyDocuments\n implements SearchableDocuments\n{\n protected requestWithCache: RequestWithCache = new RequestWithCache();\n\n constructor(\n protected collectionName: string,\n protected apiCall: ApiCall,\n protected configuration: Configuration\n ) {}\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n abortSignal = null,\n }: SearchOptions = {}\n ): Promise> {\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (const key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n const queryParams = Object.assign(\n {},\n searchParameters,\n additionalQueryParams\n );\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.get,\n [this.endpointPath(\"search\"), queryParams, { abortSignal }],\n {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n }\n ) as Promise>;\n }\n\n protected endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Synonyms, { SynonymCreateSchema } from \"./Synonyms\";\n\nexport interface SynonymSchema extends SynonymCreateSchema {\n id: string;\n}\n\nexport interface SynonymDeleteSchema {\n id: string;\n}\n\nexport default class Synonym {\n constructor(\n private collectionName: string,\n private synonymId: string,\n private apiCall: ApiCall\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Synonyms.RESOURCEPATH}/${this.synonymId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport { SynonymSchema } from \"./Synonym\";\n\nconst RESOURCEPATH = \"/synonyms\";\n\nexport interface SynonymCreateSchema {\n synonyms: string[];\n root?: string;\n locale?: string;\n symbols_to_index?: string[];\n}\n\nexport interface SynonymsRetrieveSchema {\n synonyms: SynonymSchema[];\n}\n\nexport default class Synonyms {\n constructor(private collectionName: string, private apiCall: ApiCall) {}\n\n async upsert(\n synonymId: string,\n params: SynonymCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(synonymId),\n params\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Synonyms.RESOURCEPATH\n }${operation === undefined ? \"\" : \"/\" + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods(level, loggerName) {\n /*jshint validthis:true */\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, loggerName);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this, level, loggerName);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, level, loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, defaultLevel, factory) {\n var self = this;\n var currentLevel;\n defaultLevel = defaultLevel == null ? \"WARN\" : defaultLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var location = cookie.indexOf(\n encodeURIComponent(storageKey) + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n return currentLevel;\n };\n\n self.setLevel = function (level, persist) {\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n currentLevel = level;\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(level);\n }\n replaceLoggingMethods.call(self, level, name);\n if (typeof console === undefinedType && level < self.levels.SILENT) {\n return \"No console available for logging\";\n }\n } else {\n throw \"log.setLevel() called with invalid level: \" + level;\n }\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = level;\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n self.setLevel(defaultLevel, false);\n clearPersistedLevel();\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n // Initialize with the right level\n var initialLevel = getPersistedLevel();\n if (initialLevel == null) {\n initialLevel = defaultLevel;\n }\n self.setLevel(initialLevel, false);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n var defaultLogger = new Logger();\n\n var _loggersByName = {};\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name, defaultLogger.getLevel(), defaultLogger.methodFactory);\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","/* (ignored) */","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct.bind();\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n const responseType = config.responseType;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if(!requestHeaders.getContentType(/^\\s*multipart\\/form-data/)){\n requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks\n } else if(utils.isString(contentType = requestHeaders.getContentType())){\n // fix semicolon duplication issue for ReactNative FormData implementation\n requestHeaders.setContentType(contentType.replace(/^\\s*(multipart\\/form-data);+/, '$1'))\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (platform.isStandardBrowserEnv) {\n // Add xsrf header\n // regarding CVE-2023-45857 config.withCredentials condition was removed temporarily\n const xsrfValue = isURLSameOrigin(fullPath) && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","export const VERSION = \"1.6.0\";","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.isStandardBrowserEnv ?\n\n// Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n const cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n// Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })();\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.isStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst isStandardBrowserEnv = (() => {\n let product;\n if (typeof navigator !== 'undefined' && (\n (product = navigator.product) === 'ReactNative' ||\n product === 'NativeScript' ||\n product === 'NS')\n ) {\n return false;\n }\n\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n})();\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\n const isStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n isStandardBrowserEnv,\n isStandardBrowserWebWorkerEnv,\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Client from \"./Typesense/Client\";\nimport SearchClient from \"./Typesense/SearchClient\";\nimport * as Errors from \"./Typesense/Errors\";\n\nexport { Client, SearchClient, Errors };\nexport default { Client, SearchClient, Errors };\n"],"names":["Aliases","Alias","name","apiCall","_classCallCheck","_createClass","key","value","_retrieve","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","get","endpointPath","stop","retrieve","apply","arguments","_delete2","_callee2","_callee2$","_context2","delete","_delete","concat","RESOURCEPATH","default","_upsert","mapping","put","upsert","_x","_x2","aliasName","AnalyticsRules","AnalyticsRule","Analytics","_defineProperty","_analyticsRules","rules","id","undefined","individualAnalyticsRules","params","operation","axios","HTTPError","ObjectAlreadyExists","ObjectNotFound","ObjectUnprocessable","RequestMalformed","RequestUnauthorized","ServerError","TypesenseError","APIKEYHEADERNAME","HEALTHY","UNHEALTHY","ApiCall","configuration","apiKey","nodes","JSON","parse","stringify","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","logger","initializeMetadataForNodes","currentNodeIndex","_get","endpoint","queryParameters","_ref","_ref$abortSignal","abortSignal","_ref$responseType","responseType","_args","length","performRequest","_args2","_post","_callee3","bodyParameters","_args3","_callee3$","_context3","post","_x3","_put","_callee4","_args4","_callee4$","_context4","_x4","_patch","_callee5","_args5","_callee5$","_context5","patch","_x5","_performRequest","_callee6","requestType","_ref2","_this","_ref2$queryParameters","_ref2$bodyParameters","_ref2$additionalHeade","_ref2$abortSignal","_ref2$responseType","_ref2$skipConnectionT","skipConnectionTimeout","requestNumber","lastException","_loop","_ret","numTries","_callee6$","_context7","validate","Date","now","debug","toUpperCase","node","abortListener","requestOptions","cancelToken","source","response","_response$data","_response$data2","_error$response","_loop$","_context6","getNextNode","index","aborted","v","Promise","reject","Error","method","url","uriFor","headers","Object","assign","defaultHeaders","maxContentLength","Infinity","maxBodyLength","validateStatus","status","transformResponse","data","transformedData","startsWith","timeout","keys","_typeof","CancelToken","cancel","addEventListener","token","sent","setNodeHealthcheck","resolve","customErrorForResponse","message","t0","warn","code","timer","removeEventListener","finish","delegateYield","_x6","_x7","_x8","isHealthy","nodeDueForHealthcheck","map","join","candidateNode","i","isDueForHealthcheck","lastAccessTimestamp","_this2","forEach","protocol","host","port","path","_timer","_callee7","seconds","_callee7$","_context8","setTimeout","_x9","messageFromServer","errorMessage","trim","error","httpStatus","Configuration","Collections","Collection","Keys","Key","Debug","Metrics","Health","Operations","MultiSearch","Presets","Preset","Client","options","_options$sendApiKeyAs","metrics","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","analytics","collections","collectionName","aliases","presets","Documents","Overrides","Override","Synonyms","Synonym","Document","_documents","_overrides","_synonyms","_update","schema","update","_exists","exists","documents","documentId","individualDocuments","overrides","overrideId","individualOverrides","synonyms","synonymId","individualSynonyms","_create","create","MissingConfigurationError","setDefaultPathInNode","setDefaultPortInNode","_objectSpread","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","setLevel","showDeprecationWarnings","validateNodes","isNodeMissingAnyParameters","some","every","hasOwnProperty","masterNode","readReplicaNodes","array","j","Math","floor","random","partialDocument","ImportError","SearchOnlyDocuments","_inherits","_super","_createSuper","call","document","action","idOrQuery","_createMany","import","createMany","_import2","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","_args6","Array","isArray","RangeError","includes","split","r","filter","success","_import","_export2","_args7","_export","_exportStream","_callee8","_args8","_callee8$","exportStream","_TypesenseError","importResults","_Error","constructor","setPrototypeOf","_assertThisInitialized","prototype","_wrapNativeSuper","createHmac","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","Buffer","from","keyPrefix","substr","rawScopedKey","toString","RequestWithCache","useTextContentType","requestWithCache","clearCache","_perform","searchRequests","commonParams","_ref$cacheSearchResul","additionalQueryParams","queryParams","perform","cacheResponseForSeconds","operationName","presetId","defaultCacheResponseForSeconds","defaultMaxSize","Map","responseCache","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","_cacheOptions$cacheRe","_cacheOptions$maxSize","maxSize","isCacheDisabled","requestFunctionArgumentsJSON","cacheEntry","isEntryValid","cachePromiseEntry","_isEntryValid","responsePromise","isCacheOverMaxSize","oldestEntry","isResponsePromiseCacheOverMaxSize","_oldestEntry","_toConsumableArray","requestTimestamp","set","size","SearchOnlyCollection","SearchClient","console","entries","_slicedToArray","_","collection","_search","searchParameters","search","Errors"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/typesense.min.js b/dist/typesense.min.js index d4b9e82f..33a834b8 100644 --- a/dist/typesense.min.js +++ b/dist/typesense.min.js @@ -1,2 +1,3 @@ -!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Typesense=t()}(function(){return function r(o,i,a){function s(e,t){if(!i[e]){if(!o[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(u)return u(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}n=i[e]={exports:{}},o[e][0].call(n.exports,function(t){return s(o[e][1][t]||t)},n,n.exports,r,o,i,a)}return i[e].exports}for(var u="function"==typeof require&&require,t=0;t>16&255,i[a++]=e>>8&255,i[a++]=255&e;2===r&&(e=u[t.charCodeAt(n)]<<2|u[t.charCodeAt(n+1)]>>4,i[a++]=255&e);1===r&&(e=u[t.charCodeAt(n)]<<10|u[t.charCodeAt(n+1)]<<4|u[t.charCodeAt(n+2)]>>2,i[a++]=e>>8&255,i[a++]=255&e);return i},n.fromByteArray=function(t){for(var e,n=t.length,r=n%3,o=[],i=0,a=n-r;i>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}(r));return o.join("")}(t,i,a>2]+s[e<<4&63]+"==")):2==r&&(e=(t[n-2]<<8)+t[n-1],o.push(s[e>>10]+s[e>>4&63]+s[e<<2&63]+"="));return o.join("")};for(var s=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o>>1;case"base64":return O(t).length;default:if(o)return r?-1:x(t).length;e=(""+e).toLowerCase(),o=!0}}function n(t,e,n){var r,o=!1;if((e=void 0===e||e<0?0:e)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":var i=this,a=e,s=n,u=i.length;(!s||s<0||u=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=f.from(e,r)),f.isBuffer(e))return 0===e.length?-1:d(t,e,n,r,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,n):d(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function d(t,e,n,r,o){var i=1,a=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a/=i=2,s/=2,n/=2}function u(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o)for(var c=-1,l=n;l>8,r=r%256,o.push(r),o.push(n);return o}(e,t.length-n),t,n,r)}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}var h=r,p=h.length;if(p<=g)return String.fromCharCode.apply(String,h);for(var d="",y=0;ye&&(t+=" ... "),""},f.prototype.compare=function(t,e,n,r,o){if(A(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),(e=void 0===e?0:e)<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(o<=r&&n<=e)return 0;if(o<=r)return-1;if(n<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(r,o),c=t.slice(e,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||othis.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var i,a,s,u=!1;;)switch(r){case"hex":var c=this,l=t,f=e,h=n,p=(f=Number(f)||0,c.length-f);(!h||p<(h=Number(h)))&&(h=p),(p=l.length)/2t.length)throw new RangeError("Index out of range")}function m(t,e,n,r){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function C(t,e,n,r,o){return e=+e,n>>>=0,o||m(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function E(t,e,n,r,o){return e=+e,n>>>=0,o||m(t,0,n,8),i.write(t,e,n,r,52,8),n+8}f.prototype.slice=function(t,e){var n=this.length,n=((t=~~t)<0?(t+=n)<0&&(t=0):n>>=0,e>>>=0,n||y(t,e,this.length);for(var r=this[t],o=1,i=0;++i>>=0,e>>>=0,n||y(t,e,this.length);for(var r=this[t+--e],o=1;0>>=0,e||y(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||y(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||y(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||y(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||y(t,e,this.length);for(var r=this[t],o=1,i=0;++i>>=0,e>>>=0,n||y(t,e,this.length);for(var r=e,o=1,i=this[t+--r];0>>=0,e||y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||y(t,2,this.length);e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,e){t>>>=0,e||y(t,2,this.length);e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return t>>>=0,e||y(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||y(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||y(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||y(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||w(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i>>=0,n>>>=0,r||w(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+n},f.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeIntLE=function(t,e,n,r){t=+t,e>>>=0,r||w(this,t,e,n,(r=Math.pow(2,8*n-1))-1,-r);var o=0,i=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},f.prototype.writeIntBE=function(t,e,n,r){t=+t,e>>>=0,r||w(this,t,e,n,(r=Math.pow(2,8*n-1))-1,-r);var o=n-1,i=1,a=0;for(this[e+o]=255&t;0<=--o&&(i*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/i>>0)-a&255;return e+n},f.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,1,127,-128),this[e]=255&(t=t<0?255+t+1:t),e+1},f.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,4,2147483647,-2147483648),this[e]=(t=t<0?4294967295+t+1:t)>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeFloatLE=function(t,e,n){return C(this,t,e,!0,n)},f.prototype.writeFloatBE=function(t,e,n){return C(this,t,e,!1,n)},f.prototype.writeDoubleLE=function(t,e,n){return E(this,t,e,!0,n)},f.prototype.writeDoubleBE=function(t,e,n){return E(this,t,e,!1,n)},f.prototype.copy=function(t,e,n,r){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n=n||0,r||0===r||(r=this.length),e>=t.length&&(e=t.length),(r=0=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length);var o=(r=t.length-e>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(t=t||0))for(i=e;i>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function O(t){return P.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(_,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function T(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function A(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function R(t){return t!=t}}.call(this)}.call(this,j("buffer").Buffer)},{"base64-js":32,buffer:34,ieee754:35}],35:[function(t,e,n){n.read=function(t,e,n,r,o){var i,a,s=8*o-r-1,u=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,o=t[e+f];for(f+=h,i=o&(1<<-l)-1,o>>=-l,l+=s;0>=-l,l+=r;0>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,i=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(r=Math.pow(2,-a))<1&&(a--,r*=2),2<=(e+=1<=a+l?f/r:f*Math.pow(2,1-l))*r&&(a++,r/=2),c<=a+l?(s=0,a=c):1<=a+l?(s=(e*r-1)*Math.pow(2,o),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));8<=o;t[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(e,": Node ").concat(t.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},s.prototype.initializeMetadataForNodes=function(){var n=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,!0)),this.nodes.forEach(function(t,e){t.index=e,n.setNodeHealthcheck(t,!0)})},s.prototype.setNodeHealthcheck=function(t,e){t.isHealthy=e,t.lastAccessTimestamp=Date.now()},s.prototype.uriFor=function(t,e){return(null!=e.url?"".concat(e.url):"".concat(e.protocol,"://").concat(e.host,":").concat(e.port).concat(e.path)).concat(t)},s.prototype.defaultHeaders=function(){var t={};return this.sendApiKeyAsQueryParam||(t["X-TYPESENSE-API-KEY"]=this.apiKey),t["Content-Type"]="application/json",t},s.prototype.timer=function(e){return a(this,void 0,void 0,function(){return C(this,function(t){return[2,new Promise(function(t){return setTimeout(t,1e3*e)})]})})},s.prototype.customErrorForResponse=function(t,e){var n="Request failed with HTTP code ".concat(t.status),e=("string"==typeof e&&""!==e.trim()&&(n+=" | Server said: ".concat(e)),new i.default(n));return(e=new(400===t.status?o.RequestMalformed:401===t.status?o.RequestUnauthorized:404===t.status?o.ObjectNotFound:409===t.status?o.ObjectAlreadyExists:422===t.status?o.ObjectUnprocessable:500<=t.status&&t.status<=599?o.ServerError:o.HTTPError)(n)).httpStatus=t.status,e},n.default=s},{"./Errors":62,"./Errors/TypesenseError":61,"@babel/runtime/helpers/interopRequireDefault":1,"@babel/runtime/helpers/typeof":2,axios:3}],61:[function(t,e,n){"use strict";r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var r,o,i=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=(Object.defineProperty(n,"__esModule",{value:!0}),o=Error,i(a,o),a);function a(t){var e=this.constructor,t=o.call(this,t)||this;return t.name=e.name,Object.setPrototypeOf(t,e.prototype),t}n.default=i},{}],48:[function(t,e,n){"use strict";var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;ns[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]s[0]&&e[1]e&&(a=this.responseCache.keys().next().value,this.responseCache.delete(a)),this.responsePromiseCache.size>e&&(a=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(a)),[2,i]}})})},n.default=o},{}],75:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SearchOnlyCollection=void 0;var r=t("./SearchOnlyDocuments");function o(t,e,n){this.name=t,this.apiCall=e,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}o.prototype.documents=function(){return this._documents},n.SearchOnlyCollection=o},{"./SearchOnlyDocuments":76}]},{},[38])(38)}); -//# sourceMappingURL=typesense.min.js.map +/*! For license information please see typesense.min.js.LICENSE.txt */ +(()=>{var t={43:function(t,e,n){var r,o;!function(i,s){"use strict";r=function(){var t=function(){},e="undefined",n=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(t,e){var n=t[e];if("function"==typeof n.bind)return n.bind(t);try{return Function.prototype.bind.call(n,t)}catch(e){return function(){return Function.prototype.apply.apply(n,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(e,n){for(var o=0;o=0&&n<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(t){var n=(r[t]||"silent").toUpperCase();if(typeof window!==e&&u){try{return void(window.localStorage[u]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(u)+"="+n+";"}catch(t){}}}(n),s.call(a,n,t),typeof console===e&&n{},61:(t,e,n)=>{var r=n(698).default;function o(){"use strict";t.exports=o=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,s=i.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),s=new C(r||[]);return a(i,"_invoke",{value:P(t,n,s)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",m="suspendedYield",g="executing",v="completed",b={};function w(){}function E(){}function O(){}var R={};p(R,u,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(B([])));x&&x!==i&&s.call(x,u)&&(R=x);var T=O.prototype=w.prototype=Object.create(R);function j(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(o,i,a,c){var u=d(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==r(f)&&s.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function P(t,n,r){var o=y;return function(i,s){if(o===g)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw s;return{value:e,done:!0}}for(r.method=i,r.arg=s;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===b)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var u=d(t,n,r);if("normal"===u.type){if(o=r.done?v:m,u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=v,r.method="throw",r.arg=u.arg)}}}function L(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,b;var s=i.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,b):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function B(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=s.call(i,"catchLoc"),u=s.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:B(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),b}},n}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},698:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},687:(t,e,n)=>{var r=n(61)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){for(var n=0;nre,ImportError:()=>oe,MissingConfigurationError:()=>d,ObjectAlreadyExists:()=>te,ObjectNotFound:()=>Zt,ObjectUnprocessable:()=>ee,RequestMalformed:()=>Yt,RequestUnauthorized:()=>Qt,ServerError:()=>ne,TypesenseError:()=>h}),n(43);var h=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(t){var n;return e(this,s),(n=o.call(this,t)).name=(this instanceof s?this.constructor:void 0).name,Object.setPrototypeOf(c(n),(this instanceof s?this.constructor:void 0).prototype),n}return i(s)}(p(Error));var d=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(){return e(this,s),o.apply(this,arguments)}return i(s)}(h);function y(t,e){return function(){return t.apply(e,arguments)}}n(687);const{toString:m}=Object.prototype,{getPrototypeOf:g}=Object,v=(b=Object.create(null),t=>{const e=m.call(t);return b[e]||(b[e]=e.slice(8,-1).toLowerCase())});var b;const w=t=>(t=t.toLowerCase(),e=>v(e)===t),E=t=>e=>typeof e===t,{isArray:O}=Array,R=E("undefined"),S=w("ArrayBuffer"),x=E("string"),T=E("function"),j=E("number"),A=t=>null!==t&&"object"==typeof t,P=t=>{if("object"!==v(t))return!1;const e=g(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},L=w("Date"),N=w("File"),_=w("Blob"),C=w("FileList"),B=w("URLSearchParams");function F(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),O(t))for(r=0,o=t.length;r0;)if(r=n[o],e===r.toLowerCase())return r;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,k=t=>!R(t)&&t!==D,I=(M="undefined"!=typeof Uint8Array&&g(Uint8Array),t=>M&&t instanceof M);var M;const q=w("HTMLFormElement"),z=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),H=w("RegExp"),J=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};F(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)},G="abcdefghijklmnopqrstuvwxyz",W="0123456789",K={DIGIT:W,ALPHA:G,ALPHA_DIGIT:G+G.toUpperCase()+W},V=w("AsyncFunction"),$={isArray:O,isArrayBuffer:S,isBuffer:function(t){return null!==t&&!R(t)&&null!==t.constructor&&!R(t.constructor)&&T(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||T(t.append)&&("formdata"===(e=v(t))||"object"===e&&T(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&S(t.buffer),e},isString:x,isNumber:j,isBoolean:t=>!0===t||!1===t,isObject:A,isPlainObject:P,isUndefined:R,isDate:L,isFile:N,isBlob:_,isRegExp:H,isFunction:T,isStream:t=>A(t)&&T(t.pipe),isURLSearchParams:B,isTypedArray:I,isFileList:C,forEach:F,merge:function t(){const{caseless:e}=k(this)&&this||{},n={},r=(r,o)=>{const i=e&&U(n,o)||o;P(n[i])&&P(r)?n[i]=t(n[i],r):P(r)?n[i]=t({},r):O(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t(F(e,((e,r)=>{n&&T(e)?t[r]=y(e,n):t[r]=e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,s;const a={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],r&&!r(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&g(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:v,kindOfTest:w,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(O(t))return t;let e=t.length;if(!j(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:q,hasOwnProperty:z,hasOwnProp:z,reduceDescriptors:J,freezeMethods:t=>{J(t,((e,n)=>{if(T(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];T(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return O(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:U,global:D,isContextDefined:k,ALPHABET:K,generateString:(t=16,e=K.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&T(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(A(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=O(t)?[]:{};return F(t,((t,e)=>{const i=n(t,r+1);!R(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:V,isThenable:t=>t&&(A(t)||T(t))&&T(t.then)&&T(t.catch)};function X(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}$.inherits(X,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Y=X.prototype,Q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Q[t]={value:t}})),Object.defineProperties(X,Q),Object.defineProperty(Y,"isAxiosError",{value:!0}),X.from=(t,e,n,r,o,i)=>{const s=Object.create(Y);return $.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),X.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const Z=X;function tt(t){return $.isPlainObject(t)||$.isArray(t)}function et(t){return $.endsWith(t,"[]")?t.slice(0,-2):t}function nt(t,e,n){return t?t.concat(e).map((function(t,e){return t=et(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const rt=$.toFlatObject($,{},null,(function(t){return/^is[A-Z]/.test(t)})),ot=function(t,e,n){if(!$.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!$.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&$.isSpecCompliantForm(e);if(!$.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if($.isDate(t))return t.toISOString();if(!a&&$.isBlob(t))throw new Z("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(t)||$.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,o){let a=t;if(t&&!o&&"object"==typeof t)if($.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if($.isArray(t)&&function(t){return $.isArray(t)&&!t.some(tt)}(t)||($.isFileList(t)||$.endsWith(n,"[]"))&&(a=$.toArray(t)))return n=et(n),a.forEach((function(t,r){!$.isUndefined(t)&&null!==t&&e.append(!0===s?nt([n],r,i):null===s?n:n+"[]",c(t))})),!1;return!!tt(t)||(e.append(nt(o,n,i),c(t)),!1)}const l=[],f=Object.assign(rt,{defaultVisitor:u,convertValue:c,isVisitable:tt});if(!$.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!$.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),$.forEach(n,(function(n,i){!0===(!($.isUndefined(n)||null===n)&&o.call(e,n,$.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e};function it(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function st(t,e){this._pairs=[],t&&ot(t,this,e)}const at=st.prototype;at.append=function(t,e){this._pairs.push([t,e])},at.toString=function(t){const e=t?function(e){return t.call(this,e,it)}:it;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const ct=st;function ut(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lt(t,e,n){if(!e)return t;const r=n&&n.encode||ut,o=n&&n.serialize;let i;if(i=o?o(e,n):$.isURLSearchParams(e)?e.toString():new ct(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const ft=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},pt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ht={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ct,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},dt=function(t){function e(t,n,r,o){let i=t[o++];const s=Number.isFinite(+i),a=o>=t.length;return i=!i&&$.isArray(r)?r.length:i,a?($.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&$.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&$.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r{e(function(t){return $.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},yt={transitional:pt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=$.isObject(t);if(o&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return r&&r?JSON.stringify(dt(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return ot(t,new ht.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return ht.isNode&&$.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=$.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ot(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if($.isString(t))try{return(0,JSON.parse)(t),$.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||yt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&$.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw Z.from(t,Z.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],(t=>{yt.headers[t]={}}));const mt=yt,gt=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vt=Symbol("internals");function bt(t){return t&&String(t).trim().toLowerCase()}function wt(t){return!1===t||null==t?t:$.isArray(t)?t.map(wt):String(t)}function Et(t,e,n,r,o){return $.isFunction(r)?r.call(this,e,n):(o&&(e=n),$.isString(e)?$.isString(r)?-1!==e.indexOf(r):$.isRegExp(r)?r.test(e):void 0:void 0)}class Ot{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=bt(e);if(!o)throw new Error("header name must be a non-empty string");const i=$.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=wt(t))}const i=(t,e)=>$.forEach(t,((t,n)=>o(t,n,e)));return $.isPlainObject(t)||t instanceof this.constructor?i(t,e):$.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&>[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=bt(t)){const n=$.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if($.isFunction(e))return e.call(this,t,n);if($.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=bt(t)){const n=$.findKey(this,t);return!(!n||void 0===this[n]||e&&!Et(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=bt(t)){const o=$.findKey(n,t);!o||e&&!Et(0,n[o],o,e)||(delete n[o],r=!0)}}return $.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!Et(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return $.forEach(this,((r,o)=>{const i=$.findKey(n,o);if(i)return e[i]=wt(r),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete e[o],e[s]=wt(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return $.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&$.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[vt]=this[vt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=bt(t);e[r]||(function(t,e){const n=$.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return $.isArray(t)?t.forEach(r):r(t),this}}Ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(Ot.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),$.freezeMethods(Ot);const Rt=Ot;function St(t,e){const n=this||mt,r=e||n,o=Rt.from(r.headers);let i=r.data;return $.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function xt(t){return!(!t||!t.__CANCEL__)}function Tt(t,e,n){Z.call(this,null==t?"canceled":t,Z.ERR_CANCELED,e,n),this.name="CanceledError"}$.inherits(Tt,Z,{__CANCEL__:!0});const jt=Tt,At=ht.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),$.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),$.isString(r)&&s.push("path="+r),$.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Pt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Lt=ht.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=$.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Nt(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[e?"download":"upload"]=!0,t(u)}}const _t={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=Rt.from(t.headers).normalize(),i=t.responseType;let s,a;function c(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}$.isFormData(r)&&(ht.isStandardBrowserEnv||ht.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.getContentType(/^\s*multipart\/form-data/)?$.isString(a=o.getContentType())&&o.setContentType(a.replace(/^\s*(multipart\/form-data);+/,"$1")):o.setContentType("multipart/form-data"));let u=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const l=Pt(t.baseURL,t.url);function f(){if(!u)return;const r=Rt.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new Z("Request failed with status code "+n.status,[Z.ERR_BAD_REQUEST,Z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),c()}),(function(t){n(t),c()}),{data:i&&"text"!==i&&"json"!==i?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:r,config:t,request:u}),u=null}if(u.open(t.method.toUpperCase(),lt(l,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(f)},u.onabort=function(){u&&(n(new Z("Request aborted",Z.ECONNABORTED,t,u)),u=null)},u.onerror=function(){n(new Z("Network Error",Z.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||pt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new Z(e,r.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,t,u)),u=null},ht.isStandardBrowserEnv){const e=Lt(l)&&t.xsrfCookieName&&At.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in u&&$.forEach(o.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),$.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),i&&"json"!==i&&(u.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&u.addEventListener("progress",Nt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Nt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{u&&(n(!e||e.type?new jt(null,t,u):e),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(l);p&&-1===ht.protocols.indexOf(p)?n(new Z("Unsupported protocol "+p+":",Z.ERR_BAD_REQUEST,t)):u.send(r||null)}))}};$.forEach(_t,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Ct=t=>`- ${t}`,Bt=t=>$.isFunction(t)||null===t||!1===t,Ft=t=>{t=$.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(Ct).join("\n"):" "+Ct(t[0]):"as no adapter specified";throw new Z("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Ut(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new jt(null,t)}function Dt(t){return Ut(t),t.headers=Rt.from(t.headers),t.data=St.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ft(t.adapter||mt.adapter)(t).then((function(e){return Ut(t),e.data=St.call(t,t.transformResponse,e),e.headers=Rt.from(e.headers),e}),(function(e){return xt(e)||(Ut(t),e&&e.response&&(e.response.data=St.call(t,t.transformResponse,e.response),e.response.headers=Rt.from(e.response.headers))),Promise.reject(e)}))}const kt=t=>t instanceof Rt?t.toJSON():t;function It(t,e){e=e||{};const n={};function r(t,e,n){return $.isPlainObject(t)&&$.isPlainObject(e)?$.merge.call({caseless:n},t,e):$.isPlainObject(e)?$.merge({},e):$.isArray(e)?e.slice():e}function o(t,e,n){return $.isUndefined(e)?$.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!$.isUndefined(e))return r(void 0,e)}function s(t,e){return $.isUndefined(e)?$.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>o(kt(t),kt(e),!0)};return $.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=c[r]||o,s=i(t[r],e[r],r);$.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Mt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Mt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const qt={};Mt.transitional=function(t,e,n){function r(t,e){return"[Axios v1.6.0] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new Z(r(o," has been removed"+(e?" in "+e:"")),Z.ERR_DEPRECATED);return e&&!qt[o]&&(qt[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const zt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new Z("options must be an object",Z.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new Z("option "+i+" must be "+n,Z.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Z("Unknown option "+i,Z.ERR_BAD_OPTION)}},validators:Mt},Ht=zt.validators;class Jt{constructor(t){this.defaults=t,this.interceptors={request:new ft,response:new ft}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=It(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&zt.assertOptions(n,{silentJSONParsing:Ht.transitional(Ht.boolean),forcedJSONParsing:Ht.transitional(Ht.boolean),clarifyTimeoutError:Ht.transitional(Ht.boolean)},!1),null!=r&&($.isFunction(r)?e.paramsSerializer={serialize:r}:zt.assertOptions(r,{encode:Ht.function,serialize:Ht.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&$.merge(o.common,o[e.method]);o&&$.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Rt.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!a){const t=[Dt.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);f{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new jt(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Wt((function(e){t=e})),cancel:t}}}const Kt=Wt,Vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vt).forEach((([t,e])=>{Vt[e]=t}));const $t=Vt,Xt=function t(e){const n=new Gt(e),r=y(Gt.prototype.request,n);return $.extend(r,Gt.prototype,n,{allOwnKeys:!0}),$.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(It(e,n))},r}(mt);Xt.Axios=Gt,Xt.CanceledError=jt,Xt.CancelToken=Kt,Xt.isCancel=xt,Xt.VERSION="1.6.0",Xt.toFormData=ot,Xt.AxiosError=Z,Xt.Cancel=Xt.CanceledError,Xt.all=function(t){return Promise.all(t)},Xt.spread=function(t){return function(e){return t.apply(null,e)}},Xt.isAxiosError=function(t){return $.isObject(t)&&!0===t.isAxiosError},Xt.mergeConfig=It,Xt.AxiosHeaders=Rt,Xt.formToJSON=t=>dt($.isHTMLForm(t)?new FormData(t):t),Xt.getAdapter=Ft,Xt.HttpStatusCode=$t,Xt.default=Xt;var Yt=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(){return e(this,s),o.apply(this,arguments)}return i(s)}(h);var Qt=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(){return e(this,s),o.apply(this,arguments)}return i(s)}(h);var Zt=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(){return e(this,s),o.apply(this,arguments)}return i(s)}(h);var te=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(){return e(this,s),o.apply(this,arguments)}return i(s)}(h);var ee=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(){return e(this,s),o.apply(this,arguments)}return i(s)}(h);var ne=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(){return e(this,s),o.apply(this,arguments)}return i(s)}(h);var re=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(){return e(this,s),o.apply(this,arguments)}return i(s)}(h);var oe=function(t){a(s,t);var n,r,o=(n=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(r){var o=l(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return u(this,t)});function s(t,n){var r;return e(this,s),(r=o.call(this,t)).importResults=n,r}return i(s)}(h);n(565)})()})(); +//# sourceMappingURL=typesense.min.js.map \ No newline at end of file diff --git a/dist/typesense.min.js.LICENSE.txt b/dist/typesense.min.js.LICENSE.txt new file mode 100644 index 00000000..ae386fb7 --- /dev/null +++ b/dist/typesense.min.js.LICENSE.txt @@ -0,0 +1 @@ +/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ diff --git a/dist/typesense.min.js.map b/dist/typesense.min.js.map index 4dde4b7b..295af888 100644 --- a/dist/typesense.min.js.map +++ b/dist/typesense.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@babel/runtime/helpers/interopRequireDefault.js","node_modules/@babel/runtime/helpers/typeof.js","node_modules/axios/index.js","node_modules/axios/lib/axios.js","node_modules/axios/lib/adapters/xhr.js","node_modules/axios/lib/utils.js","node_modules/axios/lib/defaults.js","node_modules/axios/lib/helpers/buildURL.js","node_modules/axios/lib/cancel/Cancel.js","node_modules/axios/lib/helpers/parseHeaders.js","node_modules/axios/lib/helpers/cookies.js","node_modules/axios/lib/helpers/isURLSameOrigin.js","node_modules/axios/lib/core/settle.js","node_modules/axios/lib/core/createError.js","node_modules/axios/lib/core/buildFullPath.js","node_modules/axios/lib/helpers/bind.js","node_modules/axios/lib/helpers/spread.js","node_modules/axios/lib/cancel/isCancel.js","node_modules/axios/lib/env/data.js","node_modules/axios/lib/core/mergeConfig.js","node_modules/axios/lib/helpers/isAxiosError.js","node_modules/axios/lib/cancel/CancelToken.js","node_modules/axios/lib/core/Axios.js","node_modules/axios/lib/core/InterceptorManager.js","node_modules/axios/lib/helpers/validator.js","node_modules/axios/lib/core/dispatchRequest.js","node_modules/axios/lib/helpers/isAbsoluteURL.js","node_modules/axios/lib/helpers/combineURLs.js","node_modules/axios/lib/core/enhanceError.js","node_modules/axios/lib/core/transformData.js","node_modules/process/browser.js","node_modules/axios/lib/helpers/normalizeHeaderName.js","node_modules/base64-js/index.js","node_modules/browser-resolve/empty.js","node_modules/buffer/index.js","node_modules/ieee754/index.js","node_modules/loglevel/lib/loglevel.js","src/Typesense.ts","src/Typesense/Errors/index.ts","src/Typesense/Client.ts","src/Typesense/SearchClient.ts","src/Typesense/Alias.ts","src/Typesense/Aliases.ts","src/Typesense/Analytics.ts","src/Typesense/AnalyticsRules.ts","src/Typesense/AnalyticsRule.ts","src/Typesense/ApiCall.ts","src/Typesense/Errors/TypesenseError.ts","src/Typesense/Configuration.ts","src/Typesense/MultiSearch.ts","src/Typesense/Collections.ts","src/Typesense/Debug.ts","src/Typesense/Health.ts","src/Typesense/Presets.ts","src/Typesense/Metrics.ts","src/Typesense/Operations.ts","src/Typesense/Key.ts","src/Typesense/Preset.ts","src/Typesense/Keys.ts","src/Typesense/Collection.ts","src/Typesense/Synonyms.ts","src/Typesense/Synonym.ts","src/Typesense/Overrides.ts","src/Typesense/Override.ts","src/Typesense/Document.ts","src/Typesense/Documents.ts","src/Typesense/SearchOnlyDocuments.ts","src/Typesense/Errors/HTTPError.ts","src/Typesense/Errors/ImportError.ts","src/Typesense/Errors/MissingConfigurationError.ts","src/Typesense/Errors/ObjectAlreadyExists.ts","src/Typesense/Errors/ObjectNotFound.ts","src/Typesense/Errors/ObjectUnprocessable.ts","src/Typesense/Errors/RequestMalformed.ts","src/Typesense/Errors/RequestUnauthorized.ts","src/Typesense/Errors/ServerError.ts","src/Typesense/RequestWithCache.ts","src/Typesense/SearchOnlyCollection.ts"],"names":["f","exports","module","define","amd","window","global","self","this","Typesense","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","1","obj","__esModule","default","_typeof","Symbol","iterator","constructor","prototype","utils","bind","Axios","mergeConfig","axios","createInstance","defaultConfig","context","instance","request","extend","create","instanceConfig","Cancel","CancelToken","isCancel","VERSION","version","all","promises","Promise","spread","isAxiosError","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","createError","defaults","config","resolve","reject","onCanceled","requestData","data","requestHeaders","headers","responseType","done","cancelToken","unsubscribe","signal","removeEventListener","isFormData","xsrfValue","XMLHttpRequest","fullPath","auth","username","password","unescape","encodeURIComponent","Authorization","btoa","baseURL","url","onloadend","response","responseHeaders","getAllResponseHeaders","responseText","status","statusText","value","err","open","method","toUpperCase","params","paramsSerializer","timeout","onreadystatechange","readyState","responseURL","indexOf","setTimeout","onabort","onerror","ontimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","isStandardBrowserEnv","withCredentials","xsrfCookieName","read","undefined","xsrfHeaderName","forEach","val","key","toLowerCase","setRequestHeader","isUndefined","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","type","abort","subscribe","aborted","send","toString","Object","isArray","Array","isArrayBuffer","isObject","isPlainObject","getPrototypeOf","fn","l","hasOwnProperty","isBuffer","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isDate","isFile","isBlob","isStream","pipe","isURLSearchParams","navigator","product","document","merge","assignValue","slice","arguments","b","thisArg","trim","str","replace","normalizeHeaderName","enhanceError","DEFAULT_CONTENT_TYPE","Content-Type","setContentTypeIfUnset","adapter","silentJSONParsing","forcedJSONParsing","process","transformRequest","stringifySafely","rawValue","parser","encoder","JSON","parse","name","stringify","transformResponse","strictJSONParsing","maxContentLength","maxBodyLength","validateStatus","common","Accept","encode","parts","serializedParams","v","toISOString","push","join","hashmarkIndex","message","__CANCEL__","ignoreDuplicateOf","parsed","split","line","substr","concat","write","expires","path","domain","secure","cookie","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","originURL","msie","urlParsingNode","resolveURL","setAttribute","href","protocol","host","search","hash","hostname","port","pathname","charAt","test","userAgent","createElement","location","requestURL","error","isAbsoluteURL","combineURLs","requestedURL","args","apply","callback","arr","config1","config2","getMergedValue","target","source","mergeDeepProperties","prop","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","transport","httpAgent","httpsAgent","socketPath","responseEncoding","keys","configValue","payload","executor","TypeError","promise","resolvePromise","token","then","_listeners","onfulfilled","_resolve","reason","throwIfRequested","listener","index","splice","InterceptorManager","dispatchRequest","validator","validators","interceptors","configOrUrl","requestInterceptorChain","assertOptions","boolean","synchronousRequestInterceptors","responseInterceptorChain","interceptor","runWhen","synchronous","unshift","fulfilled","rejected","chain","shift","newConfig","onFulfilled","onRejected","getUri","handlers","use","options","eject","id","h","deprecatedWarnings","thing","formatMessage","opt","desc","opts","console","warn","schema","allowUnknown","transformData","throwIfCancellationRequested","relativeURL","toJSON","description","number","fileName","lineNumber","columnNumber","stack","fns","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","clearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","len","run","marker","runClearTimeout","Item","array","noop","nextTick","title","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","normalizedName","toByteArray","b64","tmp","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","charCodeAt","fromByteArray","uint8","extraBytes","len2","start","end","output","num","lookup","tripletToBase64","encodeChunk","Uint8Array","34","base64","ieee754","K_MAX_LENGTH","Buffer","INSPECT_MAX_BYTES","createBuffer","RangeError","buf","__proto__","arg","encodingOrOffset","from","allocUnsafe","fromString","string","encoding","isEncoding","byteLength","actual","fromArrayLike","isInstance","byteOffset","valueOf","checked","copy","numberIsNaN","fromObject","toPrimitive","assertSize","size","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","out","toHex","utf8Slice","asciiSlice","ret","Math","min","String","fromCharCode","latin1Slice","utf16leSlice","bytes","res","swap","m","bidirectionalIndexOf","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","found","j","asciiWrite","offset","blitBuffer","byteArray","asciiToBytes","ucs2Write","units","hi","lo","utf16leToBytes","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","decodeCodePointsArray","codePoints","MAX_ARGUMENTS_LENGTH","TYPED_ARRAY_SUPPORT","foo","typedArraySupport","defineProperty","enumerable","get","species","configurable","writable","poolSize","alloc","fill","allocUnsafeSlow","_isBuffer","compare","x","y","list","pos","swap16","swap32","swap64","toLocaleString","equals","inspect","max","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","remaining","hexWrite","Number","strLen","parseInt","_arr","checkOffset","ext","checkInt","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","subarray","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","set","INVALID_BASE64_RE","Infinity","leadSurrogate","base64clean","src","dst","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","s","NaN","rt","abs","isNaN","floor","log","LN2","root","definition","undefinedType","isIE","logMethods","bindMethod","methodName","Function","traceForIE","trace","replaceLoggingMethods","level","loggerName","methodFactory","debug","defaultMethodFactory","Logger","defaultLevel","factory","currentLevel","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","exec","levels","TRACE","DEBUG","INFO","WARN","ERROR","SILENT","getLevel","setLevel","persist","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","enableAll","disableAll","initialLevel","defaultLogger","_loggersByName","_log","getLogger","noConflict","getLoggers","Client_1","__importDefault","SearchClient_1","Client","Errors","SearchClient","__importStar","HTTPError_1","MissingConfigurationError_1","HTTPError","ObjectAlreadyExists_1","MissingConfigurationError","ObjectNotFound_1","ObjectAlreadyExists","ObjectUnprocessable_1","ObjectNotFound","RequestMalformed_1","ObjectUnprocessable","RequestUnauthorized_1","RequestMalformed","ServerError_1","RequestUnauthorized","ImportError_1","ServerError","TypesenseError_1","ImportError","TypesenseError","Configuration_1","ApiCall_1","Collections_1","Collection_1","Aliases_1","Alias_1","Keys_1","Key_1","Debug_1","Metrics_1","Health_1","Operations_1","MultiSearch_1","Presets_1","Preset_1","Analytics_1","sendApiKeyAsQueryParam","_a","configuration","apiCall","metrics","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","analytics","collections","collectionName","aliases","aliasName","presets","SearchOnlyCollection_1","apiKey","clearCache","entries","documents","SearchOnlyCollection","Alias","retrieve","endpointPath","RESOURCEPATH","Aliases","upsert","mapping","put","AnalyticsRules_1","AnalyticsRule_1","Analytics","individualAnalyticsRules","_analyticsRules","rules","AnalyticsRules","operation","AnalyticsRule","axios_1","Errors_1","ApiCall","nodes","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","additionalUserHeaders","additionalHeaders","logger","initializeMetadataForNodes","currentNodeIndex","endpoint","queryParameters","_b","_c","abortSignal","_d","performRequest","post","bodyParameters","patch","requestType","_e","_f","_g","_h","_j","_k","skipConnectionTimeout","validate","requestNumber","numTries","node","this_1","getNextNode","abortListener","requestOptions","uriFor","assign","defaultHeaders","transformedData","startsWith","_typeof2","source_1","_m","sent","setNodeHealthcheck","customErrorForResponse","lastException","error_1","timer","isHealthy","nodeDueForHealthcheck","map","candidateNode","isDueForHealthcheck","lastAccessTimestamp","_this","seconds","messageFromServer","errorMessage","httpStatus","_super","__extends","_newTarget","setPrototypeOf","Configuration","setDefaultPathInNode","setDefaultPortInNode","__assign","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","showDeprecationWarnings","validateNodes","isNodeMissingAnyParameters","some","every","masterNode","readReplicaNodes","random","RequestWithCache_1","MultiSearch","useTextContentType","requestWithCache","perform","searchRequests","commonParams","additionalQueryParams","queryParams","cacheResponseForSeconds","Collections","Debug","Health","Presets","presetId","Metrics","Operations","operationName","Key","Preset","crypto_1","Keys","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","createHmac","update","keyPrefix","rawScopedKey","Documents_1","Overrides_1","Override_1","Synonyms_1","Synonym_1","Document_1","Collection","individualDocuments","individualOverrides","individualSynonyms","_documents","_overrides","_synonyms","exists","e_1","documentId","Document","overrides","overrideId","synonyms","synonymId","Synonyms","Synonym","Overrides","Override","partialDocument","SearchOnlyDocuments_1","Documents","SearchOnlyDocuments","action","idOrQuery","createMany","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","filter","success","exportStream","searchParameters","importResults","RequestWithCache","responseCache","Map","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","maxSize","__spreadArray","requestFunctionArgumentsJSON","cacheEntry","requestTimestamp","cachePromiseEntry","responsePromise","oldestEntry","next"],"mappings":"CAAA,SAAAA,GAAA,iBAAAC,SAAA,oBAAAC,OAAAA,OAAAD,QAAAD,IAAA,mBAAAG,QAAAA,OAAAC,IAAAD,OAAA,GAAAH,IAAA,oBAAAK,OAAAA,OAAA,oBAAAC,OAAAA,OAAA,oBAAAC,KAAAA,KAAAC,MAAAC,UAAAT,IAAA,CAAA,WAAA,OAAA,SAAAU,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAf,GAAA,IAAAY,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAC,EAAA,mBAAAC,SAAAA,QAAA,IAAAjB,GAAAgB,EAAA,OAAAA,EAAAD,GAAA,GAAA,GAAAG,EAAA,OAAAA,EAAAH,GAAA,GAAA,MAAAI,EAAA,IAAAC,MAAA,uBAAAL,EAAA,MAAAM,KAAA,mBAAAF,EAAAG,EAAAV,EAAAG,GAAA,CAAAd,QAAA,IAAAU,EAAAI,GAAA,GAAAQ,KAAAD,EAAArB,QAAA,SAAAS,GAAA,OAAAI,EAAAH,EAAAI,GAAA,GAAAL,IAAAA,IAAAY,EAAAA,EAAArB,QAAAS,EAAAC,EAAAC,EAAAC,GAAA,OAAAD,EAAAG,GAAAd,QAAA,IAAA,IAAAiB,EAAA,mBAAAD,SAAAA,QAAAF,EAAA,EAAAA,EAAAF,EAAAW,OAAAT,IAAAD,EAAAD,EAAAE,IAAA,OAAAD,EAAA,CAAA,CAAAW,EAAA,CAAA,SAAAR,EAAAf,EAAAD,GCMAC,EAAAD,QANA,SAAAyB,GACA,OAAAA,GAAAA,EAAAC,WAAAD,EAAA,CACAE,QAAAF,IAIAxB,EAAAD,QAAA0B,YAAA,EAAAzB,EAAAD,QAAA,QAAAC,EAAAD,S,uBCNA,SAAA4B,EAAAH,GAGA,O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,KAAAorB,QAAAA,EACAprB,KAAAmrB,cAAAA,EAEjBnrB,KAAK+1B,WAAa,IAAIgB,EAAAE,oBACpBj3B,KAAKyL,KACLzL,KAAKorB,QACLprB,KAAKmrB,eAITyB,EAAAnrB,UAAAkrB,UAAA,WACE,OAAO3sB,KAAK+1B,YAhBHt2B,EAAAmtB,qBAkBbA,0C9EtBA","file":"typesense.min.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i