PageSourceSearch

https://www.victronenergy.com/_next/static/chunks/a4aedd72-41f4a7dbe95122a2.js

js victronenergy.com collected 2026-09-24 09:05:39 UTC 73,317 bytes, 1 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="30d6da09-f0f3-4042-acb9-70736a4dfde8",t._sentryDebugIdIdentifier="sentry-dbid-30d6da09-f0f3-4042-acb9-70736a4dfde8")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[23341],{74236:function(t,e,n){(function(t){"use strict";var e={TASK_SUCCEEDED:"succeeded",TASK_PROCESSING:"processing",TASK_FAILED:"failed",TASK_ENQUEUED:"enqueued",TASK_CANCELED:"canceled"},r={INDEX_CREATION_FAILED:"index_creation_failed",MISSING_INDEX_UID:"missing_index_uid",INDEX_ALREADY_EXISTS:"index_already_exists",INDEX_NOT_FOUND:"index_not_found",INVALID_INDEX_UID:"invalid_index_uid",INDEX_NOT_ACCESSIBLE:"index_not_accessible",INVALID_INDEX_OFFSET:"invalid_index_offset",INVALID_INDEX_LIMIT:"invalid_index_limit",INVALID_STATE:"invalid_state",PRIMARY_KEY_INFERENCE_FAILED:"primary_key_inference_failed",INDEX_PRIMARY_KEY_ALREADY_EXISTS:"index_primary_key_already_exists",INVALID_INDEX_PRIMARY_KEY:"invalid_index_primary_key",DOCUMENTS_FIELDS_LIMIT_REACHED:"document_fields_limit_reached",MISSING_DOCUMENT_ID:"missing_document_id",INVALID_DOCUMENT_ID:"invalid_document_id",INVALID_CONTENT_TYPE:"invalid_content_type",MISSING_CONTENT_TYPE:"missing_content_type",INVALID_DOCUMENT_FIELDS:"invalid_document_fields",INVALID_DOCUMENT_LIMIT:"invalid_document_limit",INVALID_DOCUMENT_OFFSET:"invalid_document_offset",INVALID_DOCUMENT_FILTER:"invalid_document_filter",MISSING_DOCUMENT_FILTER:"missing_document_filter",INVALID_DOCUMENT_VECTORS_FIELD:"invalid_document_vectors_field",PAYLOAD_TOO_LARGE:"payload_too_large",MISSING_PAYLOAD:"missing_payload",MALFORMED_PAYLOAD:"malformed_payload",NO_SPACE_LEFT_ON_DEVICE:"no_space_left_on_device",INVALID_STORE_FILE:"invalid_store_file",INVALID_RANKING_RULES:"missing_document_id",INVALID_REQUEST:"invalid_request",INVALID_DOCUMENT_GEO_FIELD:"invalid_document_geo_field",INVALID_SEARCH_Q:"invalid_search_q",INVALID_SEARCH_OFFSET:"invalid_search_offset",INVALID_SEARCH_LIMIT:"invalid_search_limit",INVA
1LID_SEARCH_PAGE:"invalid_search_page",INVALID_SEARCH_HITS_PER_PAGE:"invalid_search_hits_per_page",INVALID_SEARCH_ATTRIBUTES_TO_RETRIEVE:"invalid_search_attributes_to_retrieve",INVALID_SEARCH_ATTRIBUTES_TO_CROP:"invalid_search_attributes_to_crop",INVALID_SEARCH_CROP_LENGTH:"invalid_search_crop_length",INVALID_SEARCH_ATTRIBUTES_TO_HIGHLIGHT:"invalid_search_attributes_to_highlight",INVALID_SEARCH_SHOW_MATCHES_POSITION:"invalid_search_show_matches_position",INVALID_SEARCH_FILTER:"invalid_search_filter",INVALID_SEARCH_SORT:"invalid_search_sort",INVALID_SEARCH_FACETS:"invalid_search_facets",INVALID_SEARCH_HIGHLIGHT_PRE_TAG:"invalid_search_highlight_pre_tag",INVALID_SEARCH_HIGHLIGHT_POST_TAG:"invalid_search_highlight_post_tag",INVALID_SEARCH_CROP_MARKER:"invalid_search_crop_marker",INVALID_SEARCH_MATCHING_STRATEGY:"invalid_search_matching_strategy",INVALID_SEARCH_VECTOR:"invalid_search_vector",INVALID_SEARCH_ATTRIBUTES_TO_SEARCH_ON:"invalid_search_attributes_to_search_on",BAD_REQUEST:"bad_request",DOCUMENT_NOT_FOUND:"document_not_found",INTERNAL:"internal",INVALID_API_KEY:"invalid_api_key",INVALID_API_KEY_DESCRIPTION:"invalid_api_key_description",INVALID_API_KEY_ACTIONS:"invalid_api_key_actions",INVALID_API_KEY_INDEXES:"invalid_api_key_indexes",INVALID_API_KEY_EXPIRES_AT:"invalid_api_key_expires_at",API_KEY_NOT_FOUND:"api_key_not_found",IMMUTABLE_API_KEY_UID:"immutable_api_key_uid",IMMUTABLE_API_KEY_ACTIONS:"immutable_api_key_actions",IMMUTABLE_API_KEY_INDEXES:"immutable_api_key_indexes",IMMUTABLE_API_KEY_EXPIRES_AT:"immutable_api_key_expires_at",IMMUTABLE_API_KEY_CREATED_AT:"immutable_api_key_created_at",IMMUTABLE_API_KEY_UPDATED_AT:"immutable_api_key_updated_at",MISSING_AUTHORIZATION_HEADER:"missing_authorization_header",UNRETRIEVABLE_DOCUMENT:"unretrievable_document",MAX_DATABASE_SIZE_LIMIT_REACHED:"database_size_limit_reached",TASK_NOT_FOUND:"task_not_found",DUMP_PROCESS_FAILED:"dump_process_failed",DUMP_NOT_FOUND:"dump_not_found",INVALID_SWAP_DUPLICATE_INDEX_FOUND:"invalid_swap_duplicate_index_found",INVALID_SWAP_INDEXES:"invalid_swap_indexes",MISSING_SWAP_INDEXES:"missing_swap_indexes",MISSING_MASTER_KEY:"missing_master_key",INVALID_TASK_TYPES:"invalid_task_types",INVALID_TASK_UIDS:"invalid_task_uids",INVALID_TASK_STATUSES:"invalid_task_statuses",INVALID_TASK_LIMIT:"invalid_task_limit",INVA
1LID_TASK_FROM:"invalid_task_from",INVALID_TASK_CANCELED_BY:"invalid_task_canceled_by",MISSING_TASK_FILTERS:"missing_task_filters",TOO_MANY_OPEN_FILES:"too_many_open_files",IO_ERROR:"io_error",INVALID_TASK_INDEX_UIDS:"invalid_task_index_uids",IMMUTABLE_INDEX_UID:"immutable_index_uid",IMMUTABLE_INDEX_CREATED_AT:"immutable_index_created_at",IMMUTABLE_INDEX_UPDATED_AT:"immutable_index_updated_at",INVALID_SETTINGS_DISPLAYED_ATTRIBUTES:"invalid_settings_displayed_attributes",INVALID_SETTINGS_SEARCHABLE_ATTRIBUTES:"invalid_settings_searchable_attributes",INVALID_SETTINGS_FILTERABLE_ATTRIBUTES:"invalid_settings_filterable_attributes",INVALID_SETTINGS_SORTABLE_ATTRIBUTES:"invalid_settings_sortable_attributes",INVALID_SETTINGS_RANKING_RULES:"invalid_settings_ranking_rules",INVALID_SETTINGS_STOP_WORDS:"invalid_settings_stop_words",INVALID_SETTINGS_SYNONYMS:"invalid_settings_synonyms",INVALID_SETTINGS_DISTINCT_ATTRIBUTE:"invalid_settings_distinct_attribute",INVALID_SETTINGS_TYPO_TOLERANCE:"invalid_settings_typo_tolerance",INVALID_SETTINGS_FACETING:"invalid_settings_faceting",INVALID_SETTINGS_PAGINATION:"invalid_settings_pagination",INVALID_SETTINGS_SEARCH_CUTOFF_MS:"invalid_settings_search_cutoff_ms",INVALID_TASK_BEFORE_ENQUEUED_AT:"invalid_task_before_enqueued_at",INVALID_TASK_AFTER_ENQUEUED_AT:"invalid_task_after_enqueued_at",INVALID_TASK_BEFORE_STARTED_AT:"invalid_task_before_started_at",INVALID_TASK_AFTER_STARTED_AT:"invalid_task_after_started_at",INVALID_TASK_BEFORE_FINISHED_AT:"invalid_task_before_finished_at",INVALID_TASK_AFTER_FINISHED_AT:"invalid_task_after_finished_at",MISSING_API_KEY_ACTIONS:"missing_api_key_actions",MISSING_API_KEY_INDEXES:"missing_api_key_indexes",MISSING_API_KEY_EXPIRES_AT:"missing_api_key_expires_at",INVALID_API_KEY_LIMIT:"invalid_api_key_limit",INVA
1LID_API_KEY_OFFSET:"invalid_api_key_offset",INVALID_FACET_SEARCH_FACET_NAME:"invalid_facet_search_facet_name",MISSING_FACET_SEARCH_FACET_NAME:"missing_facet_search_facet_name",INVALID_FACET_SEARCH_FACET_QUERY:"invalid_facet_search_facet_query",INVALID_SEARCH_RANKING_SCORE_THRESHOLD:"invalid_search_ranking_score_threshold",INVALID_SIMILAR_RANKING_SCORE_THRESHOLD:"invalid_similar_ranking_score_threshold"};function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function a(){a=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",o=i.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(t){p=function(t,e,n){return t[e]=n}}function h(e,n,r,i){var a,u,c,o,p=Object.create((n&&n.prototype instanceof y?n:y).prototype);return s(p,"_invoke",{value:(a=e,u=r,c=new S(i||[]),o=d,function(e,n){if(o===l)throw Error("Generator is already running");if(o===v){if("throw"===e)throw n;return{value:t,done:!0}}for(c.method=e,c.arg=n;;){var r=c.delegate;if(r){var s=function e(n,r){var s=r.method,i=n.iterator[s];if(i===t)return r.delegate=null,"throw"===s&&n.iterator.return&&(r.method="return",r.arg=t,e(n,r),"throw"===r.method)||"return"!==s&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+s+"' method")),_;var a=f(i,n.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,_;var u=a.arg;return u?u.done?(r[n.resultName]=u.value,r.next=n.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,_):u:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,_)}(r,c);if(s){if(s===_)continue;return s}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(o===d)throw o=v,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);o=l;var i=f(a,u,c);if("normal"===i.type){if(o=c.done?v:"suspendedYield",i.arg===_)continue;return{value:i.arg,done:c.done}}"throw"===i.type&&(o=v,c.method="throw",c.arg=i.arg)}})}),p}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",l="executing",v="completed",_={};function y(){}function w(){}function m(){}var x={};p(x,u,function(){return this});var k=Object.getPrototypeOf,g=k&&k(k(D([])));g&&g!==n&&r.call(g,u)&&(x=g);var A=m.prototype=y.prototype=Object.create(x);function I(t){["next","throw","return"].forEach(function(e){p(t,e,function(t){return this._invoke(e,t)})})}function b(t,e){var n;s(this,"_invoke",{value:function(s,i){function a(){return new e(function(n,a){!function n(s,i,a,u){var c=f(t[s],t,i);if("throw"!==c.type){var o=c.arg,p=o.value;return p&&"object"==typeof p&&r.call(p,"__await")?e.resolve(p.__await).then(function(t){n("next",t,a,u)},function(t){n("throw",t,a,u)}):e.resolve(p).then(function(t){o.value=t,a(o)},function(t){return n("throw",t,a,u)})}u(c.arg)}(s,i,n,a)})}return n=n?n.then(a,a):a()}})}function E(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(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var s=-1,i=function n(){for(;++s<e.length;)if(r.call(e,s))return n.value=e[s],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw TypeError(typeof e+" is not iterable")}return w.prototype=m,s(A,"constructor",{value:m,configurable:!0}),s(m,"constructor",{value:w,configurable:!0}),w.displayName=p(m,o,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,o,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},I(b.prototype),p(b.prototype,c,function(){return this}),e.AsyncIterator=b,e.async=function(t,n,r,s,i){void 0===i&&(i=Prom
1ise);var a=new b(h(t,n,r,s),i);return e.isGeneratorFunction(n)?a:a.next().then(function(t){return t.done?t.value:a.next()})},I(A),p(A,o,"Generator"),p(A,u,function(){return this}),p(A,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=D,S.prototype={constructor:S,reset:function(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(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function s(r,s){return u.type="throw",u.arg=e,n.next=r,s&&(n.method="next",n.arg=t),!!s}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return s("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),o=r.call(a,"finallyLoc");if(c&&o){if(this.prev<a.catchLoc)return s(a.catchLoc,!0);if(this.prev<a.finallyLoc)return s(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return s(a.catchLoc,!0)}else{if(!o)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return s(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n];if(s.tryLoc<=this.prev&&r.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var i=s;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,_):this.complete(a)},complete:function(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),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),_}},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 s=r.arg;T(n)}return s}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:D(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),_}},e}function u(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function c(t){return(c="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)}function o(t,e,n,r,s,i,a){try{var u=t[i](a),c=u.value}catch(t){n(t);return}u.done?e(c):Promise.resolve(c).then(r,s)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,s){var i=t.apply(e,n);function a(t){o(i,r,s,a,u,"next",t)}function u(t){o(i,r,s,a,u,"throw",t)}a(void 0)})}}function h(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function d(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,n){return(e=u(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}function _(t){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}
1function y(t,e){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function w(){if("undefined"==typeof Reflect||!Reflect.construct||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 m(t,e,n){return(m=w()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var s=new(Function.bind.apply(t,r));return n&&y(s,n.prototype),s}).apply(null,arguments)}function x(t){var e="function"==typeof Map?new Map:void 0;return(x=function(t){if(null===t||!function(t){try{return -1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return m(t,arguments,_(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,t)})(t)}function k(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t){var e=w();return function(){var n,r=_(t);n=e?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments);if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw TypeError("Derived constructors may only return object or undefined");return k(this)}}function A(t,e){if(t){if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var b=function(t){v(n,t);var e=g(n);function n(t){var r;return h(this,n),Object.setPrototypeOf(k(r=e.call(this,t)),n.prototype),r.name="MeiliSearchError",Error.captureStackTrace&&Error.captureStackTrace(k(r),n),r}return d(n)}(x(Error)),E=function(t){v(n,t);var e=g(n);function n(t,r,s,i){var a,u,c,o;return h(this,n),l(k(a=e.call(this,t)),"statusCode",void 0),l(k(a),"errno",void 0),l(k(a),"code",void 0),l(k(a),"stack",void 0),Object.setPrototypeOf(k(a),n.prototype),a.name="MeiliSearchCommunicationError",r instanceof Response&&(a.message=r.statusText,a.statusCode=r.status),r instanceof Error&&(a.errno=r.errno,a.code=r.code),i?(a.stack=i,a.stack=null==(u=a.stack)?void 0:u.replace(/(TypeError|FetchError)/,a.name),a.stack=null==(c=a.stack)?void 0:c.replace("Failed to fetch","request to ".concat(s," failed, reason: connect ECONNREFUSED")),a.stack=null==(o=a.stack)?void 0:o.replace("Not Found","Not Found: ".concat(s))):Error.captureStackTrace&&Error.captureStackTrace(k(a),n),a}return d(n)}(b),T=function(t){v(n,t);var e=g(n);function n(t,r){var s;return h(this,n),l(k(s=e.call(this,t.message)),"httpStatus",void 0),l(k(s),"code",void 0),l(k(s),"link",void 0),l(k(s),"type",void 0),l(k(s),"stack",void 0),Object.setPrototypeOf(k(s),n.prototype),s.name="MeiliSearchApiError",s.code=t.code,s.type=t.type,s.link=t.link,s.message=t.message,s.httpStatus=r,Error.captureStackTrace&&Error.captureStackTrace(k(s),n),s}return d(n)}(b);function S(t){return D.apply(this,arguments)}function D(){return(D=p(a().mark(function t(e){var n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=11;break}return t.prev=1,t.next=4,e.json();case 4:n=t.sent,t.next=10;break;case 7:throw t.prev=7,t.t0=t.catch(1),new E(e.statusText,e,e.url);case 10:throw new T(n,e.status);case 11:return t.abrupt("return",e);case 12:case"end":return t.stop()}},t,null,[[1,7]])}))).apply(this,arguments)}function R(t,e,n){if("MeiliSearchApiError"!==t.name)throw new E(t.message,t,n,e);throw t}var N=function(t){v(n,t);var e=g(n);function n(t){var r;return h(this,n),Object.setPrototypeOf(k(r=e.call(this,t)),n.prototype),r.name="MeiliSearchTimeOutError",Error.captureStackTrace&&Error.captureStackTrace(k(r),n),r}return d(n)}(b);function O(t,e){return"".concat(t,"\nHint: It might not be working because maybe you're not up to date with the Meilisearch version that ").concat(e," call requires.")}function L(t){return Object.entries(t).reduce(function(t,e){var n=function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,s,i,a,u=[],c=!0,o=!1;try{i=(n=n.call(t)).next,!1;for(;
1!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){o=!0,s=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(o)throw s}}return u}}(e,2)||A(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],s=n[1];return void 0!==s&&(t[r]=s),t},{})}function q(){return(q=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise(function(t){return setTimeout(t,e)});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t)}))).apply(this,arguments)}function C(t){return Object.keys(t).reduce(function(e,n){var r=t[n];return void 0===r?e:Array.isArray(r)?i(i({},e),{},l({},n,r.join(","))):r instanceof Date?i(i({},e),{},l({},n,r.toISOString())):i(i({},e),{},l({},n,r))},{})}var M=function(){var t,e,r,s,u,c,o;function f(t){h(this,f),l(this,"headers",void 0),l(this,"url",void 0),l(this,"requestConfig",void 0),l(this,"httpClient",void 0),l(this,"requestTimeout",void 0),this.headers=function(t){var e,n,r="X-Meilisearch-Client",s="Meilisearch JavaScript (v".concat("0.41.0",")"),i="Authorization",a=function(t){if(Array.isArray(t))return t.reduce(function(t,e){return t[e[0]]=e[1],t},{});if(!("has"in t))return Object.assign({},t);var e={};return t.forEach(function(t,n){return e[n]=t}),e}(null!=(e=null==(n=t.requestConfig)?void 0:n.headers)?e:{});if(t.apiKey&&!a[i]&&(a[i]="Bearer ".concat(t.apiKey)),a["Content-Type"]||(a["Content-Type"]="application/json"),t.clientAgents&&Array.isArray(t.clientAgents)){var u=t.clientAgents.concat(s);a[r]=u.join(" ; ")}else if(t.clientAgents&&!Array.isArray(t.clientAgents))throw new b('Meilisearch: The header "'.concat(r,'" should be an array of string(s).\n'));else a[r]=s;return a}(t),this.requestConfig=t.requestConfig,this.httpClient=t.httpClient,this.requestTimeout=t.timeout;try{var e=function(t){try{var e,n;return(n=t=!((e=t).startsWith("https://")||e.startsWith("http://"))?"http://".concat(e):e).endsWith("/")||(n+="/"),t=n}catch(t){throw new b("The provided host is not valid.")}}(t.host);this.url=new URL(e)}catch(t){throw new b("The provided host is not valid.")}}return d(f,[{key:"request",value:(t=p(a().mark(function t(e){var r,s,u,c,o,p,h,f,d,l,v,_,y,w;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(s=e.method,u=e.url,c=e.params,o=e.body,h=void 0===(p=e.config)?{}:p,"undefined"==typeof fetch&&n(29007),f=new URL(u,this.url),c&&(d=new URLSearchParams,Object.keys(c).filter(function(t){return null!==c[t]}).map(function(t){return d.set(t,c[t])}),f.search=d.toString()),null!=(r=h.headers)&&r["Content-Type"]||(o=JSON.stringify(o)),l=i(i({},this.headers),h.headers),t.prev=6,v=this.fetchWithTimeout(f.toString(),i(i(i({},h),this.requestConfig),{},{method:s,body:o,headers:l}),this.requestTimeout),!this.httpClient){t.next=12;break}return t.next=11,v;case 11:return t.abrupt("return",t.sent);case 12:return t.next=14,v.then(function(t){return S(t)});case 14:return _=t.sent,t.next=17,_.json().catch(function(){});case 17:return y=t.sent,t.abrupt("return",y);case 21:t.prev=21,t.t0=t.catch(6),w=t.t0.stack,R(t.t0,w,f.toString());case 25:case"end":return t.stop()}},t,this,[[6,21]])})),function(e){return t.apply(this,arguments)})},{key:"fetchWithTimeout",value:(e=p(a().mark(function t(e,n,r){var s=this;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,i){var a,u=[(s.httpClient?s.httpClient:fetch)(e,n)];if(r){var c=new Promise(function(t,e){a=setTimeout(function(){e(Error("Error: Request Timed Out"))},r)});u.push(c)}Promise.race(u).then(t).catch(i).finally(function(){clearTimeout(a)})}));case 1:case"end":return t.stop()}},t)})),function(t,n,r){return e.apply(this,arguments)})},{key:"get",value:(r=p(a().mark(function t(e,n,r){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"GET",url:e,params:n,config:r});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,n){return r.apply(this,arguments)})},{key:"post",value:(s=p(a().mark(function t(e,n,r,s){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"POST",url:e,body:n,params:r,config:s});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,n,r){return s.apply(this,arguments)})},{key:"put",value:(u=p(a().mark(function t(e,n,r,s){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"PUT",url:e,body:n,params:r,config:s});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,n,r){return u.apply(this,arguments)})},{key:"patch",value:(c=p(a().mark(function t(e,n,r,s){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"PATCH",url:e,body:n,params:r,config:s});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,n,r){return c.apply(this,arguments)})},{key:"delete",value:(o=p(a().mark(function t(e,n,r,s){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"DELETE",url:e,body:n,params:r,config:s});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,n,r){return o.apply(this,arguments)})}]),f}(),P=d(function t(e){h(this,t),l(this,"taskUid",void 0),l(this,"indexUid",void 0),l(this,"status",void 0),l(this,"type",void 0),l(this,"enqueuedAt",void 0),this.taskUid=e.taskUid,this.indexUid=e.indexUid,this.status=e.status,this.type=e.type,this.enqueuedAt=new Date(e.enqueuedAt)}),U=d(function t(e){h(this,t),l(this,"indexUid",void 0),l(this,"status",void 0),l(this,"type",void 0),l(this,"uid",void 0),l(this,"canceledBy",void 0),l(this,"details",void 0),l(this,"error",void 0),l(this,"duration",void 0),l(this,"startedAt",void 0),l(this,"enqueuedAt",void 0),l(this,"finishedAt",void 0),this.indexUid=e.indexUid,this.status=e.status,this.type=e.type,this.uid=e.uid,this.details=e.details,this.canceledBy=e.canceledBy,this.error=e.error,this.duration=e.duration,this.startedAt=new Date(e.startedAt),this.enqueuedAt=new Date(e.enqueuedAt),this.finishedAt=new Date(e.finishedAt)}),F=function(){var t,n,r,s,u,c;function o(t){h(this,o),l(this,"httpRequest",void 0),this.httpRequest=new M(t)}return d(o,[{key:"getTask",value:(t=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="tasks/".concat(e),t.next=3,this.httpRequest.get(n);case 3:return r=t.sent,t.abrupt("return",new U(r));case 5:case"end":return t.stop()}},t,this)})),function(e){return t.apply(this,arguments)})},{key:"getTasks",value:(n=p(a().mark(function t(){var e,n,r=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=4,this.httpRequest.get("tasks",C(e));case 4:return n=t.sent,t.abrupt("return",i(i({},n),{},{results:n.results.map(function(t){return new U(t)})}
1));case 6:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"waitForTask",value:(r=p(a().mark(function t(n){var r,s,i,u,c,o,p,h=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=void 0===(s=(r=h.length>1&&void 0!==h[1]?h[1]:{}).timeOutMs)?5e3:s,c=void 0===(u=r.intervalMs)?50:u,o=Date.now();case 2:if(!(Date.now()-o<i)){t.next=12;break}return t.next=5,this.getTask(n);case 5:if(p=t.sent,[e.TASK_ENQUEUED,e.TASK_PROCESSING].includes(p.status)){t.next=8;break}return t.abrupt("return",p);case 8:return t.next=10,function(t){return q.apply(this,arguments)}(c);case 10:t.next=2;break;case 12:throw new N("timeout of ".concat(i,"ms has exceeded on process ").concat(n," when waiting a task to be resolved."));case 13:case"end":return t.stop()}},t,this)})),function(t){return r.apply(this,arguments)})},{key:"waitForTasks",value:(s=p(a().mark(function t(e){var n,r,s,i,u,c,o,p,h,f,d=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:s=void 0===(r=(n=d.length>1&&void 0!==d[1]?d[1]:{}).timeOutMs)?5e3:r,u=void 0===(i=n.intervalMs)?50:i,c=[],o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=A(t))){n&&(t=n);var r=0,s=function(){};return{s:s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:s}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(e),t.prev=3,o.s();case 5:if((p=o.n()).done){t.next=13;break}return h=p.value,t.next=9,this.waitForTask(h,{timeOutMs:s,intervalMs:u});case 9:f=t.sent,c.push(f);case 11:t.next=5;break;case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(3),o.e(t.t0);case 18:return t.prev=18,o.f(),t.finish(18);case 21:return t.abrupt("return",c);case 22:case"end":return t.stop()}},t,this,[[3,15,18,21]])})),function(t){return s.apply(this,arguments)})},{key:"cancelTasks",value:(u=p(a().mark(function t(){var e,n,r=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=4,this.httpRequest.post("tasks/cancel",{},C(e));case 4:return n=t.sent,t.abrupt("return",new P(n));case 6:case"end":return t.stop()}},t,this)})),function(){return u.apply(this,arguments)})},{key:"deleteTasks",value:(c=p(a().mark(function t(){var e,n,r=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=4,this.httpRequest.delete("tasks",{},C(e));case 4:return n=t.sent,t.abrupt("return",new P(n));case 6:case"end":return t.stop()}},t,this)})),function(){return c.apply(this,arguments)})}]),o}(),V=function(){var t,e,n,r,s,u,o,f,v,_,y,w,m,x,k,g,A,I,S,D,R,N,q,C,U,V,j,K,G,H,Y,B,X,W,Q,J,z,Z,$,tt,te,tn,tr,ts,ti,ta,tu,tc,to,tp,th,tf,td,tl,tv,t_,ty,tw,tm,tx,tk,tg,tA,tI,tb,tE,tT,tS,tD,tR,tN,tO,tL,tq,tC,tM,tP,tU,tF,tV;function tj(t,e,n){h(this,tj),l(this,"uid",void 0),l(this,"primaryKey",void 0),l(this,"createdAt",void 0),l(this,"updatedAt",void 0),l(this,"httpRequest",void 0),l(this,"tasks",void 0),this.uid=e,this.primaryKey=n,this.httpRequest=new M(t),this.tasks=new F(t)}return d(tj,[{key:"search",value:(t=p(a().mark(function t(e,n,r){var s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s="indexes/".concat(this.uid,"/search"),t.next=3,this.httpRequest.post(s,L(i({q:e},n)),void 0,r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(e,n,r){return t.apply(this,arguments)})},{key:"searchGet",value:(e=p(a().mark(function t(e,n,r){var s,u,c,o,p,h,f,d,l,v;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return d="indexes/".concat(this.uid,"/search"),l=function(t){if("string"==typeof t)return t;if(Array.isArray(t))throw new b("The filter query parameter should be in string format when using searchGet")},v=i(i({q:e},n),{},{filter:l(null==n?void 0:n.filter),sort:null==n||null==(s=n.sort)?void 0:s.join(","),facets:null==n||null==(u=n.facets)?void 0:u.join(","),attributesToRetrieve:null==n||null==(c=n.attributesToRetrieve)?void 0:c.join(","),attributesToCrop:null==n||null==(o=n.attributesToCrop)?void 0:o.join(","),attributesToHighlight:null==n||null==(p=n.attributesToHighlight)?void 0:p.join(","),vector:null==n||null==(h=n.vector)?void 0:h.join(","),attributesToSearchOn:null==n||null==(f=n.attributesToSearchOn)?void 0:f.join(",")}),t.next=5,this.httpRequest.get(d,L(v),r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}},t,this)})),function(t,n,r){return e.apply(this,arguments)})},{key:"searchForFacetValues",value:(n=p(a().mark(function t(e,n){var r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/facet-search"),t.next=3,this.httpRequest.post(r,L(e),void 0,n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)})},{key:"searchSimilarDocuments",value:(r=p(a().mark(function t(e){var n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/similar"),t.next=3,this.httpRequest.post(n,L(e),void 0);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return r.apply(this,arguments)})},{key:"getRawInfo",value:(s=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid),t.next=3,this.httpRequest.get(e);case 3:return n=t.sent,this.primaryKey=n.primaryKey,this.updatedAt=new Date(n.updatedAt),this.createdAt=new Date(n.createdAt),t.abrupt("return",n);case 8:case"end":return t.stop()}},t,this)})),function(){return s.apply(this,arguments)})},{key:"fetchInfo",value:(u=p(a().mark(function t(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRawInfo();case 2:return t.abrupt("return",this);case 3:case"end":return t.stop()}},t,this)})),function(){return u.apply(this,arguments)})},{key:"fetchPrimaryKey",value:(o=p(a().mark(function t(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRawInfo();case 2:return this.primaryKey=t.sent.primaryKey,t.abrupt("return",this.primaryKey);case 4:case"end":return t.stop()}},t,this)})),function(){return o.apply(this,arguments)})},{key:"update",value:(f=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid),t.next=3,this.httpRequest.patch(n,e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(t){return f.apply(this,arguments)})},{key:"delete",value:(v=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid),t.next=3,this.httpRequest.delete(e);case 3:return n=t.sent,t.abrupt("return",new P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return v.apply(this,arguments)})},{key:"getTasks",value:(_=p(a().mark(function t(){var e,n=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=3,this.tasks.getTasks(i(i({},e),{},{indexUids:[this.uid]}));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return _.apply(this,arguments)})},{key:"getTask",value:(y=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.getTask(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t){return y.apply(this,arguments)})},{key:"waitForTasks",value:(w=p(a().mark(function t(e){var n,r,s,i,u,c=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=void 0===(r=(n=c.length>1&&void 0!==c[1]?c[1]:{}).timeOutMs)?5e3:r,u=void 0===(i=n.intervalMs)?50:i,t.next=3,this.tasks.waitForTasks(e,{timeOutMs:s,intervalMs:u});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"waitForTask",value:(m=p(a().mark(function t(e){var n,r,s,i,u,c=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=void 0===(r=(n=c.length>1&&void 0!==c[1]?c[1]:{}).timeOutMs)?5e3:r,u=void 0===(i=n.intervalMs)?50:i,t.next=3,this.tasks.waitForTask(e,{timeOutMs:s,intervalMs:u});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return m.apply(this,arguments)})},{key:"getStats",value:(x=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/stats"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return x.apply(this,arguments)})},{key:"getDocuments",value:(k=p(a().mark(function t(){var e,n,r,s,u,c,o,p=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===(e=L(e=p.length>0&&void 0!==p[0]?p[0]:{})).filter){t.next=16;break}return t.prev=3,n="indexes/".concat(this.uid,"/documents/fetch"),t.next=7,this.httpRequest.post(n,e);case 7:case 20:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(3),t.t0 instanceof E?t.t0.message=O(t.t0.message,"getDocuments"):t.t0 instanceof T&&(t.t0.message=O(t.t0.message,"getDocuments")),t.t0;case 14:t.next=21;break;case 16:return c="indexes/".concat(this.uid,"/documents"),o=Array.isArray(null==(r=e)?void 0:r.fields)?{fields:null==(s=e)||null==(u=s.fields)?void 0:u.join(",")}:{},t.next=20,this.httpRequest.get(c,i(i({},e),o));case 21:case"end":return t.stop()}},t,this,[[3,10]])})),function(){return k.apply(this,arguments)})},{key:"getDocument",value:(g=p(a().mark(function t(e,n){var r,s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/documents/").concat(e),s=function(){if(Array.isArray(null==n?void 0:n.fields)){var t;return null==n||null==(t=n.fields)?void 0:t.join(",")}}(),t.next=4,this.httpRequest.get(r,L(i(i({},n),{},{fields:s})));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}},t,this)})),function(t,e){return g.apply(this,arguments)})},{key:"addDocuments",value:(A=p(a().mark(function t(e,n){var r,s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.post(r,e,n);case 3:return s=t.sent,t.abrupt("return",new P(s));case 5:case"end":return t.stop()}},t,this)})),function(t,e){return A.apply(this,arguments)})},{key:"addDocumentsFromString",value:(I=p(a().mark(function t(e,n,r){var s,i;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.post(s,e,r,{headers:{"Content-Type":n}});case 3:return i=t.sent,t.abrupt("return",new P(i));case 5:case"end":return t.stop()}},t,this)})),function(t,e,n){return I.apply(this,arguments)})},{key:"addDocumentsInBatches",value:(S=p(a().mark(function t(e){var n,r,s,i,u=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=u.length>1&&void 0!==u[1]?u[1]:1e3,r=u.length>2?u[2]:void 0,s=[],i=0;case 4:if(!(i<e.length)){t.next=13;break}return t.t0=s,t.next=8,this.addDocuments(e.slice(i,i+n),r);case 8:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 10:i+=n,t.next=4;break;case 13:return t.abrupt("return",s);case 14:case"end":return t.stop()}},t,this)})),function(t){return S.apply(this,arguments)})},{key:"updateDocuments",value:(D=p(a().mark(function t(e,n){var r,s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.put(r,e,n);case 3:return s=t.sent,t.abrupt("return",new P(s));case 5:case"end":return t.stop()}},t,this)})),function(t,e){return D.apply(this,arguments)})},{key:"updateDocumentsInBatches",value:(R=p(a().mark(function t(e){var n,r,s,i,u=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=u.length>1&&void 0!==u[1]?u[1]:1e3,r=u.length>2?u[2]:void 0,s=[],i=0;case 4:if(!(i<e.length)){t.next=13;break}return t.t0=s,t.next=8,this.updateDocuments(e.slice(i,i+n),r);case 8:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 10:i+=n,t.next=4;break;case 13:return t.abrupt("return",s);case 14:case"end":return t.stop()}},t,this)})),function(t){return R.apply(this,arguments)})},{key:"updateDocumentsFromString",value:(N=p(a().mark(function t(e,n,r){var s,i;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.put(s,e,r,{headers:{"Content-Type":n}});case 3:return i=t.sent,t.abrupt("return",new P(i));case 5:case"end":return t.stop()}},t,this)})),function(t,e,n){return N.apply(this,arguments)})},{key:"deleteDocument",value:(q=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/documents/").concat(e),t.next=3,this.httpRequest.delete(n);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(t){return q.apply(this,arguments)})},{key:"deleteDocuments",value:(C=p(a().mark(function t(e){var n,r,s,i;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=(n=!Array.isArray(e)&&"object"===c(e))?"documents/delete":"documents/delete-batch",s="indexes/".concat(this.uid,"/").concat(r),t.prev=3,t.next=6,this.httpRequest.post(s,e);case 6:return i=t.sent,t.abrupt("return",new P(i));case 10:throw t.prev=10,t.t0=t.catch(3),t.t0 instanceof E&&n?t.t0.message=O(t.t0.message,"deleteDocuments"):t.t0 instanceof T&&(t.t0.message=O(t.t0.message,"deleteDocuments")),t.t0;case 14:case"end":return t.stop()}},t,this,[[3,10]])})),function(t){return C.apply(this,arguments)})},{key:"deleteAllDocuments",value:(U=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return U.apply(this,arguments)})},{key:"getSettings",value:(V=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return V.apply(this,arguments)})},{key:"updateSettings",value:(j=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings"),t.next=3,this.httpRequest.patch(n,e);case 3:return(r=t.sent).enqueued=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(t){return j.apply(this,arguments)})},{key:"resetSettings",value:(K=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return K.apply(this,arguments)})},{key:"getPagination",value:(G=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/pagination"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return G.apply(this,arguments)})},{key:"updatePagination",value:(H=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/pagination"),t.next=3,this.httpRequest.patch(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return H.apply(this,a
1rguments)})},{key:"resetPagination",value:(Y=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/pagination"),t.next=3,this.httpRequest.delete(e);case 3:return n=t.sent,t.abrupt("return",new P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return Y.apply(this,arguments)})},{key:"getSynonyms",value:(B=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/synonyms"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return B.apply(this,arguments)})},{key:"updateSynonyms",value:(X=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/synonyms"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return X.apply(this,arguments)})},{key:"resetSynonyms",value:(W=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/synonyms"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return W.apply(this,arguments)})},{key:"getStopWords",value:(Q=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/stop-words"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return Q.apply(this,arguments)})},{key:"updateStopWords",value:(J=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/stop-words"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return J.apply(this,arguments)})},{key:"resetStopWords",value:(z=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/stop-words"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return z.apply(this,arguments)})},{key:"getRankingRules",value:(Z=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/ranking-rules"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return Z.apply(this,arguments)})},{key:"updateRankingRules",value:($=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/ranking-rules"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return $.apply(this,arguments)})},{key:"resetRankingRules",value:(tt=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/ranking-rules"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return tt.apply(this,arguments)})},{key:"getDistinctAttribute",value:(te=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/distinct-attribute"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return te.apply(this,arguments)})},{key:"updateDistinctAttribute",value:(tn=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/distinct-attribute"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tn.apply(this,arguments)})},{key:"resetDistinctAttribute",value:(tr=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/distinct-attribute"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return tr.apply(this,arguments)})},{key:"getFilterableAttributes",value:(ts=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/filterable-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return ts.apply(this,arguments)})},{key:"updateFilterableAttributes",value:(ti=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/filterable-attributes"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return ti.apply(this,arguments)})},{key:"resetFilterableAttributes",value:(ta=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/filterable-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return ta.apply(this,arguments)})},{key:"getSortableAttributes",value:(tu=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/sortable-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tu.apply(this,arguments)})},{key:"updateSortableAttributes",value:(tc=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/sortable-attributes"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tc.apply(this,arguments)})},{key:"resetSortableAttributes",value:(to=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/sortable-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return to.apply(this,arguments)})},{key:"getSearchableAttributes",value:(tp=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/searchable-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tp.apply(this,arguments)})},{key:"updateSearchableAttributes",value:(th=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/searchable-attributes"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return th.apply(this,arguments)})},{key:"resetSearchableAttributes",value:(tf=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/searchable-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return tf.apply(this,arguments)})},{key:"getDisplayedAttributes",value:(td=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/displayed-attributes"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return td.apply(this,arguments)})},{key:"updateDisplayedAttributes",value:(tl=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/displayed-attributes"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tl.apply(this,arguments)})},{key:"resetDisplayedAttributes",value:(tv=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/displayed-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return tv.apply(this,arguments)})},{key:"getTypoTolerance",value:(t_=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/typo-tolerance"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return t_.apply(this,arguments)})},{key:"updateTypoTolerance",value:(ty=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/typo-tolerance"),t.next=3,this.httpRequest.patch(n,e);case 3:return(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(t){return ty.apply(this,arguments)})},{key:"resetTypoTolerance",value:(tw=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/typo-tolerance"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return tw.apply(this,arguments)})},{key:"getFaceting",value:(tm=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/faceting"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tm.apply(this,arguments)})},{key:"updateFaceting",value:(tx=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/faceting"),t.next=3,this.httpRequest.patch(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tx.apply(this,arguments)})},{key:"resetFaceting",value:(tk=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/faceting"),t.next=3,this.httpRequest.delete(e);case 3:return n=t.sent,t.abrupt("return",new P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return tk.apply(this,arguments)})},{key:"getSeparatorTokens",value:(tg=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/separator-tokens"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tg.apply(this,arguments)})},{key:"updateSeparatorTokens",value:(tA=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/separator-tokens"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tA.apply(this,arguments)})},{key:"resetSeparatorTokens",value:(tI=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/separator-tokens"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return tI.apply(this,arguments)})},{key:"getNonSeparatorTokens",value:(tb=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/non-separator-tokens"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tb.apply(this,arguments)})},{key:"updateNonSeparatorTokens",value:(tE=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/non-separator-tokens"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tE.apply(this,arguments)})},{key:"resetNonSeparatorTokens",value:(tT=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/non-separator-tokens"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return tT.apply(this,arguments)})},{key:"getDictionary",value:(tS=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/dictionary"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tS.apply(this,arguments)})},{key:"updateDictionary",value:(tD=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/dictionary"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tD.apply(this,arguments)})},{key:"resetDictionary",value:(tR=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/dictionary"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return tR.apply(this,arguments)})},{key:"getProximityPrecision",value:(tN=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tN.apply(this,arguments)})},{key:"updateProximityPrecision",value:(tO=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tO.apply(this,arguments)})},{key:"resetProximityPrecision",value:(tL=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){re
1turn tL.apply(this,arguments)})},{key:"getEmbedders",value:(tq=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/embedders"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tq.apply(this,arguments)})},{key:"updateEmbedders",value:(tC=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/embedders"),t.next=3,this.httpRequest.patch(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tC.apply(this,arguments)})},{key:"resetEmbedders",value:(tM=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/embedders"),t.next=3,this.httpRequest.delete(e);case 3:return(n=t.sent).enqueuedAt=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(){return tM.apply(this,arguments)})},{key:"getSearchCutoffMs",value:(tP=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/search-cutoff-ms"),t.next=3,this.httpRequest.get(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return tP.apply(this,arguments)})},{key:"updateSearchCutoffMs",value:(tU=p(a().mark(function t(e){var n,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/settings/search-cutoff-ms"),t.next=3,this.httpRequest.put(n,e);case 3:return r=t.sent,t.abrupt("return",new P(r));case 5:case"end":return t.stop()}},t,this)})),function(t){return tU.apply(this,arguments)})},{key:"resetSearchCutoffMs",value:(tF=p(a().mark(function t(){var e,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/search-cutoff-ms"),t.next=3,this.httpRequest.delete(e);case 3:return n=t.sent,t.abrupt("return",new P(n));case 5:case"end":return t.stop()}},t,this)})),function(){return tF.apply(this,arguments)})}],[{key:"create",value:(tV=p(a().mark(function t(e){var n,r,s,u=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},r=new M(u.length>2?u[2]:void 0),t.next=6,r.post("indexes",i(i({},n),{},{uid:e}));case 6:return s=t.sent,t.abrupt("return",new P(s));case 8:case"end":return t.stop()}},t)})),function(t){return tV.apply(this,arguments)})}]),tj}(),j=function(t){v(n,t);var e=g(n);function n(t){return h(this,n),e.call(this,t)}return d(n)}(function(){var t,e,n,s,u,c,o,f,v,_,y,w,m,x,k,g,A,I,b,E,T,S,D,R,N,O,L;function q(t){h(this,q),l(this,"config",void 0),l(this,"httpRequest",void 0),l(this,"tasks",void 0),this.config=t,this.httpRequest=new M(t),this.tasks=new F(t)}return d(q,[{key:"index",value:function(t){return new V(this.config,t)}},{key:"getIndex",value:(t=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new V(this.config,e).fetchInfo());case 1:case"end":return t.stop()}},t,this)})),function(e){return t.apply(this,arguments)})},{key:"getRawIndex",value:(e=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new V(this.config,e).getRawInfo());case 1:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"getIndexes",value:(n=p(a().mark(function t(){var e,n,r,s=this,u=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=u.length>0&&void 0!==u[0]?u[0]:{},t.next=3,this.getRawIndexes(e);case 3:return r=(n=t.sent).results.map(function(t){return new V(s.config,t.uid,t.primaryKey)}),t.abrupt("return",i(i({},n),{},{results:r}));case 6:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"getRawIndexes",value:(s=p(a().mark(function t(){var e,n=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=4,this.httpRequest.get("indexes",e);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}},t,this)})),function(){return s.apply(this,arguments)})},{key:"createIndex",value:(u=p(a().mark(function t(e){var n,r=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},t.next=3,V.create(e,n,this.config);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return u.apply(this,arguments)})},{key:"updateIndex",value:(c=p(a().mark(function t(e){var n,r=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},t.next=3,new V(this.config,e).update(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return c.apply(this,arguments)})},{key:"deleteIndex",value:(o=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new V(this.config,e).delete();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t){return o.apply(this,arguments)})},{key:"deleteIndexIfExists",value:(f=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.deleteIndex(e);case 3:return t.abrupt("return",!0);case 6:if(t.prev=6,t.t0=t.catch(0),t.t0.code!==r.INDEX_NOT_FOUND){t.next=10;break}return t.abrupt("return",!1);case 10:throw t.t0;case 11:case"end":return t.stop()}},t,this,[[0,6]])})),function(t){return f.apply(this,arguments)})},{key:"swapIndexes",value:(v=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.httpRequest.post("/swap-indexe
1s",e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return v.apply(this,arguments)})},{key:"multiSearch",value:(_=p(a().mark(function t(e,n){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.httpRequest.post("multi-search",e,void 0,n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t,e){return _.apply(this,arguments)})},{key:"getTasks",value:(y=p(a().mark(function t(){var e,n=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=3,this.tasks.getTasks(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return y.apply(this,arguments)})},{key:"getTask",value:(w=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.getTask(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t){return w.apply(this,arguments)})},{key:"waitForTasks",value:(m=p(a().mark(function t(e){var n,r,s,i,u,c=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=void 0===(r=(n=c.length>1&&void 0!==c[1]?c[1]:{}).timeOutMs)?5e3:r,u=void 0===(i=n.intervalMs)?50:i,t.next=3,this.tasks.waitForTasks(e,{timeOutMs:s,intervalMs:u});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return m.apply(this,arguments)})},{key:"waitForTask",value:(x=p(a().mark(function t(e){var n,r,s,i,u,c=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=void 0===(r=(n=c.length>1&&void 0!==c[1]?c[1]:{}).timeOutMs)?5e3:r,u=void 0===(i=n.intervalMs)?50:i,t.next=3,this.tasks.waitForTask(e,{timeOutMs:s,intervalMs:u});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return x.apply(this,arguments)})},{key:"cancelTasks",value:(k=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.tasks.cancelTasks(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t){return k.apply(this,arguments)})},{key:"deleteTasks",value:(g=p(a().mark(function t(){var e,n=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=3,this.tasks.deleteTasks(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return g.apply(this,arguments)})},{key:"getKeys",value:(A=p(a().mark(function t(){var e,n,r=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},t.next=4,this.httpRequest.get("keys",e);case 4:return(n=t.sent).results=n.results.map(function(t){return i(i({},t),{},{createdAt:new Date(t.createdAt),updatedAt:new Date(t.updatedAt)})}),t.abrupt("return",n);case 7:case"end":return t.stop()}},t,this)})),function(){return A.apply(this,arguments)})},{key:"getKey",value:(I=p(a().mark(function t(e){var n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="keys/".concat(e),t.next=3,this.httpRequest.get(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return I.apply(this,arguments)})},{key:"createKey",value:(b=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.httpRequest.post("keys",e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return b.apply(this,arguments)})},{key:"updateKey",value:(E=p(a().mark(function t(e,n){var r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="keys/".concat(e),t.next=3,this.httpRequest.patch(r,n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t,e){return E.apply(this,arguments)})},{key:"deleteKey",value:(T=p(a().mark(function t(e){var n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="keys/".concat(e),t.next=3,this.httpRequest.delete(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return T.apply(this,arguments)})},{key:"health",value:(S=p(a().mark(function t(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.httpRequest.get("health");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return S.apply(this,arguments)})},{key:"isHealthy",value:(D=p(a().mark(function t(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=4,this.httpRequest.get("health");case 4:return t.abrupt("return",!0);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",!1);case 10:case"end":return t.stop()}},t,this,[[0,7]])})),function(){return D.apply(this,arguments)})},{key:"getStats",value:(R=p(a().mark(function t(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.httpRequest.get("stats");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return R.apply(this,arguments)})},{key:"getVersion",value:(N=p(a().mark(function t(){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.httpRequest.get("version");case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return N.apply(this,arguments)})},{key:"createDump",value:(O=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.httpRequest.post("dumps");case 3:return e=t.sent,t.abrupt("return",new P(e));case 5:case"end":return t.stop()}},t,this)})),function(){return O.apply(this,arguments)})},{key:"createSnapshot",value:(L=p(a().mark(function t(){var e;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,this.httpRequest.post("snapshots");case 3:return e=t.sent,t.abrupt("return",new P(e));case 5:case"end":return t.stop()}},t,this)})),function(){return L.apply(this,arguments)})},{key:"generateTenantToken",value:function(t,e,n){var r=Error();return r.message="Meilisearch: failed to generate a tenant token. Generation of a token only w
1orks in a node environment \n ".concat(r.stack,"."),Promise.reject(r)}}]),q}());t.ContentTypeEnum={JSON:"application/json",CSV:"text/csv",NDJSON:"application/x-ndjson"},t.ErrorStatusCode=r,t.Index=V,t.MatchingStrategies={ALL:"all",LAST:"last",FREQUENCY:"frequency"},t.MeiliSearch=j,t.MeiliSearchApiError=T,t.MeiliSearchCommunicationError=E,t.MeiliSearchError=b,t.MeiliSearchTimeOutError=N,t.Meilisearch=j,t.TaskStatus=e,t.TaskTypes={DOCUMENTS_ADDITION_OR_UPDATE:"documentAdditionOrUpdate",DOCUMENT_DELETION:"documentDeletion",DUMP_CREATION:"dumpCreation",INDEX_CREATION:"indexCreation",INDEX_DELETION:"indexDeletion",INDEXES_SWAP:"indexSwap",INDEX_UPDATE:"indexUpdate",SETTINGS_UPDATE:"settingsUpdate",SNAPSHOT_CREATION:"snapshotCreation",TASK_CANCELATION:"taskCancelation",TASK_DELETION:"taskDeletion"},t.default=j,t.httpErrorHandler=R,t.httpResponseErrorHandler=S,t.versionErrorHintMessage=O,Object.defineProperty(t,"__esModule",{value:!0})})(e)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.