1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="932d9ce7-81b9-eeba-2e59-a58a6bbcb823")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,579567,t=>{"use strict";var e,r=t.i(61892),n=t.i(305751),s=((e={}).brands="brands",e.fragrances="fragrances",e.notes="notes",e.noteCategories="noteCategories",e.users="users",e.perfumers="perfumers",e.blogPosts="blogPosts",e.videos="videos",e.accords="accords",e);t.s(["MeiliIndex",()=>s,"getTranslatedIndexName",0,function(t,e){let[s]=(0,n.intlLocaleSplit)(e);return"fragrances"!==t&&"notes"!==t&&"noteCategories"!==t?(0,r.worktreeIndex)(t):(0,r.worktreeIndex)(`${t}_${s}`)}])},186320,(t,e,r)=>{var n;n="u">typeof self?self:t.e,function(e){var r="u">typeof globalThis&&globalThis||void 0!==n&&n||t.g||{},s={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};if(s.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(t){return t&&i.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function o(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return s.iterable&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){if(2!=t.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function h(t){if(!t._noBody){if(t.bodyUsed)return Promise.reject(TypeError("Already read"));t.bodyUsed=!0}}function f(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function d(t){var e=new FileReader,r=f(e);return e.readAsArrayBuffer(t),r}function l(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){if(this.bodyUsed=this.bodyUsed,this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(s.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(s.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(s.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else{var e;s.arrayBuffer&&s.blob&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=l(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||a(t))?this._bodyArrayBuffer=l(t):this._bodyText=t=Object.prototype.toString.call(t)}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s.blob&&(this.blob=function(){var t=h(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=h(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(s.blob)return this.blob().then(d);throw Error("could not read as ArrayBuffer")},this.text=function(){var t,e,r,n,s,i=h(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,r=f(e=new FileReader),s=(n=/charset=([A-Za-z0-9_-]+)/.exec(t.type))?n[1]:"utf-8",e.readAsText(t,s),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},s.formData&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=u(t),e=o(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},p.prototype.delete=function(t){delete this.map[u(t)]},p.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},p.prototype.set=function(t,e){this.map[u(t)]=o(e)},p.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},p.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),c(t)},p.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},p.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),c(t)},s.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);var v=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function _(t,e){if(!(this instanceof _))throw TypeError('Please use the "new" operator, this DOM object c
2onstructor cannot be called as a function.');var n,s,i=(e=e||{}).body;if(t instanceof _){if(t.bodyUsed)throw TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new p(e.headers)),this.method=(s=(n=e.method||this.method||"GET").toUpperCase(),v.indexOf(s)>-1?s:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in r)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),("GET"===this.method||"HEAD"===this.method)&&("no-store"===e.cache||"no-cache"===e.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function w(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),s=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(s))}}),e}function m(t,e){if(!(this instanceof m))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},m.error=function(){var t=new m(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var b=[301,302,303,307,308];m.redirect=function(t,e){if(-1===b.indexOf(e))throw RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}})},e.DOMException=r.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function x(t,n){return new Promise(function(i,a){var c=new _(t,n);if(c.signal&&c.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var h=new XMLHttpRequest;function f(){h.abort()}if(h.onload=function(){var t,e,r={statusText:h.statusText,headers:(t=h.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}
2).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var s=r.join(":").trim();try{e.append(n,s)}catch(t){console.warn("Response "+t.message)}}}),e)};0===c.url.indexOf("file://")&&(h.status<200||h.status>599)?r.status=200:r.status=h.status,r.url="responseURL"in h?h.responseURL:r.headers.get("X-Request-URL");var n="response"in h?h.response:h.responseText;setTimeout(function(){i(new m(n,r))},0)},h.onerror=function(){setTimeout(function(){a(TypeError("Network request failed"))},0)},h.ontimeout=function(){setTimeout(function(){a(TypeError("Network request timed out"))},0)},h.onabort=function(){setTimeout(function(){a(new e.DOMException("Aborted","AbortError"))},0)},h.open(c.method,function(t){try{return""===t&&r.location.href?r.location.href:t}catch(e){return t}}(c.url),!0),"include"===c.credentials?h.withCredentials=!0:"omit"===c.credentials&&(h.withCredentials=!1),"responseType"in h&&(s.blob?h.responseType="blob":s.arrayBuffer&&(h.responseType="arraybuffer")),n&&"object"==typeof n.headers&&!(n.headers instanceof p||r.Headers&&n.headers instanceof r.Headers)){var d=[];Object.getOwnPropertyNames(n.headers).forEach(function(t){d.push(u(t)),h.setRequestHeader(t,o(n.headers[t]))}),c.headers.forEach(function(t,e){-1===d.indexOf(e)&&h.setRequestHeader(e,t)})}else c.headers.forEach(function(t,e){h.setRequestHeader(e,t)});c.signal&&(c.signal.addEventListener("abort",f),h.onreadystatechange=function(){4===h.readyState&&c.signal.removeEventListener("abort",f)}),h.send(void 0===c._bodyInit?null:c._bodyInit)})}x.polyfill=!0,r.fetch||(r.fetch=x,r.Headers=p,r.Request=_,r.Response=m),e.Headers=p,e.Request=_,e.Response=m,e.fetch=x,Object.defineProperty(e,"__esModule",{value:!0})}({})},416056,(t,e,r)=>{t.e,function(e){"use strict";var r={TASK_SUCCEEDED:"succeeded",TASK_PROCESSING:"processing",TASK_FAILED:"failed",TASK_ENQUEUED:"enqueued",TASK_CANCELED:"canceled"},n={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",INVA
2LID_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
2LID_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
2LID_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_SETTINGS_LOCALIZED_ATTRIBUTES:"invalid_settings_localized_attributes",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
2LID_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 r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function a(){a=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function h(e,r,n,i){var a,u,o,c,p=Object.create((r&&r.prototype instanceof _?r:_).prototype);return s(p,"_invoke",{value:(a=e,u=n,o=new S(i||[]),c=d,function(e,r){if(c===l)throw Error("Generator is already running");if(c===y){if("throw"===e)throw r;return{value:t,done:!0}}for(o.method=e,o.arg=r;;){var n=o.delegate;if(n){var s=function e(r,n){var s=n.method,i=r.iterator[s];if(i===t)return n.delegate=null,"throw"===s&&r.iterator.return&&(n.method="return",n.arg=t,e(r,n),"throw"===n.method)||"return"!==s&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+s+"' method")),v;var a=f(i,r.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var u=a.arg;return u?u.done?(n[r.resultName]=u.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):u:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,v)}(n,o);if(s){if(s===v)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(c===d)throw c=y,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);c=l;var i=f(a,u,o);if("normal"===i.type){if(c=o.done?y:"suspendedYield",i.arg===v)continue;return{value:i.arg,done:o.done}}"throw"===i.type&&(c=y,o.method="throw",o.arg=i.arg)}})}),p}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",l="executing",y="completed",v={};function _(){}function w(){}function m(){}var b={};p(b,u,function(){return this});var x=Object.getPrototypeOf,A=x&&x(x(D([])));A&&A!==r&&n.call(A,u)&&(b=A);var g=m.prototype=_.prototype=Object.create(b);function k(t){["next","throw","return"].forEach(function(e){p(t,e,function(t){return this._invoke(e,t)})})}function I(t,e){var r;s(this,"_invoke",{value:function(s,i){function a(){return new e(function(r,a){!function r(s,i,a,u){var o=f(t[s],t,i);if("throw"!==o.type){var c=o.arg,p=c.value;return p&&"object"==typeof p&&n.call(p,"__await")?e.resolve(p.__await).then(function(t){r("next",t,a,u)},function(t){r("throw",t,a,u)}):e.resolve(p).then(function(t){c.value=t,a(c)},function(t){return r("throw",t,a,u)})}u(o.arg)}(s,i,r,a)})}return r=r?r.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 r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var s=-1,i=function r(){for(;++s<e.length;)if(n.call(e,s))return r.value=e[s],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw TypeError(typeof e+" is not iterable")}return w.prototype=m,s(g,"constructor",{value:m,configurable:!0}),s(m,"constructor",{value:w,configurable:!0}),w.displayName=p(m,c,"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,c,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},k(I.prototype),p(I.prototype,o,function(){return this}),e.AsyncIterator=I,e.async=function(t,r,n,s,i){void 0===i&&(i=Prom
2ise);var a=new I(h(t,r,n,s),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(g),p(g,c,"Generator"),p(g,u,function(){return this}),p(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 t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,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 r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function s(n,s){return u.type="throw",u.arg=e,r.next=n,s&&(r.method="next",r.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 o=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(o&&c){if(this.prev<a.catchLoc)return s(a.catchLoc,!0);if(this.prev<a.finallyLoc)return s(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return s(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return s(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.tryLoc<=this.prev&&n.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,v):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),v},finish:function(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),T(r),v}},catch:function(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 s=n.arg;T(r)}return s}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function u(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function o(t){return(o="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 c(t,e,r,n,s,i,a){try{var u=t[i](a),o=u.value}catch(t){r(t);return}u.done?e(o):Promise.resolve(o).then(n,s)}function p(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var i=t.apply(e,r);function a(t){c(i,n,s,a,u,"next",t)}function u(t){c(i,n,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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function d(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,r){return(e=u(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(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&&_(t,e)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _(t,e){return(_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function w(){if("u"<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,r){return(m=w()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var s=new(Function.bind.apply(t,n));return r&&_(s,r.prototype),s}).apply(null,arguments)}function b(t){var e="function"==typeof Map?new Map:void 0;return(b=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,r)}function r(){return m(t,arguments,v(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,t)})(t)}function x(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function A(t){var e=w();return function(){var r,n=v(t);r=e?Reflect.construct(n,arguments,v(this).constructor):n.apply(this,arguments);if(r&&("object"==typeof r||"function"==typeof r))return r;if(void 0!==r)throw TypeError("Derived constructors may only return object or undefined");return x(this)}}function g(t,e){if(t){if("string"==typeof t)return k(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return k(t,e)}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var I=function(t){y(r,t);var e=A(r);function r(){var t;h(this,r);for(var n=arguments.length,s=Array(n),i=0;i<n;i++)s[i]=arguments[i];return l(x(t=e.call.apply(e,[this].concat(s))),"name","MeiliSearchError"),t}return d(r)}(b(Error)),E=function(t){y(r,t);var e=A(r);function r(t,n){var s,i;return h(this,r),l(x(i=e.call(this,null!=(s=null==n?void 0:n.message)?s:"".concat(t.status,": ").concat(t.statusText))),"name","MeiliSearchApiError"),l(x(i),"cause",void 0),l(x(i),"response",void 0),i.response=t,void 0!==n&&(i.cause=n),i}return d(r)}(I),T=function(t){y(r,t);var e=A(r);function r(t,n){var s;return h(this,r),l(x(s=e.call(this,"Request to ".concat(t," has failed"),{cause:n})),"name","MeiliSearchRequestError"),s}return d(r)}(I),S=function(t){y(r,t);var e=A(r);function r(t){var n;return h(this,r),l(x(n=e.call(this,t)),"name","MeiliSearchTimeOutError"),n}return d(r)}(I);function D(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 R(t){return Object.entries(t).reduce(function(t,e){var r=function(t){if(Array.isArray(t))return t}(e)||function(t){var e=null==t?null:"u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,n,s,i,a=[],u=!0,o=!1;
2try{s=(e=e.call(t)).next,!1;for(;!(u=(r=s.call(e)).done)&&(a.push(r.value),2!==a.length);u=!0);}catch(t){o=!0,n=t}finally{try{if(!u&&null!=e.return&&(i=e.return(),Object(i)!==i))return}finally{if(o)throw n}}return a}}(e)||g(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.")}(),n=r[0],s=r[1];return void 0!==s&&(t[n]=s),t},{})}function N(){return(N=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 O(t){return Object.keys(t).reduce(function(e,r){var n=t[r];return void 0===n?e:Array.isArray(n)?i(i({},e),{},l({},r,n.join(","))):n instanceof Date?i(i({},e),{},l({},r,n.toISOString())):i(i({},e),{},l({},r,n))},{})}var L=function(){var e,r,n,s,u,o,c;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,r,n="X-Meilisearch-Client",s="Meilisearch JavaScript (v".concat("0.42.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,r){return e[r]=t}),e}(null!=(e=null==(r=t.requestConfig)?void 0:r.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[n]=u.join(" ; ")}else if(t.clientAgents&&!Array.isArray(t.clientAgents))throw new I('Meilisearch: The header "'.concat(n,'" should be an array of string(s).\n'));else a[n]=s;return a}(t),this.requestConfig=t.requestConfig,this.httpClient=t.httpClient,this.requestTimeout=t.timeout;try{var e=function(t){try{var e,r;return(r=t=!((e=t).startsWith("https://")||e.startsWith("http://"))?"http://".concat(e):e).endsWith("/")||(r+="/"),t=r}catch(t){throw new I("The provided host is not valid.")}}(t.host);this.url=new URL(e)}catch(t){throw new I("The provided host is not valid.")}}return d(f,[{key:"request",value:(e=p(a().mark(function e(r){var n,s,u,o,c,p,h,f,d,l,y,v,_,w;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=r.method,u=r.url,o=r.params,c=r.body,h=void 0===(p=r.config)?{}:p,"u"<typeof fetch&&t.r(186320),f=new URL(u,this.url),o&&(d=new URLSearchParams,Object.keys(o).filter(function(t){return null!==o[t]}).map(function(t){return d.set(t,o[t])}),f.search=d.toString()),null!=(n=h.headers)&&n["Content-Type"]||(c=JSON.stringify(c)),l=i(i({},this.headers),h.headers),y=this.fetchWithTimeout(f.toString(),i(i(i({},h),this.requestConfig),{},{method:s,body:c,headers:l}),this.requestTimeout),e.next=9,y.catch(function(t){throw new T(f.toString(),t)});case 9:if(v=e.sent,void 0===this.httpClient){e.next=12;break}return e.abrupt("return",v);case 12:return e.next=14,v.text();case 14:if(w=""===(_=e.sent)?void 0:JSON.parse(_),v.ok){e.next=18;break}throw new E(v,w);case 18:return e.abrupt("return",w);case 19:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"fetchWithTimeout",value:(r=p(a().mark(function t(e,r,n){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,r)];if(n){var o=new Promise(function(t,e){a=setTimeout(function(){e(Error("Error: Request Timed Out"))},n)});u.push(o)}Promise.race(u).then(t).catch(i).finally(function(){clearTimeout(a)})}));case 1:case"end":return t.stop()}},t)})),function(t,e,n){return r.apply(this,arguments)})},{key:"get",value:(n=p(a().mark(function t(e,r,n){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.request({method:"GET",url:e,params:r,config:n});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,r){return n.apply(this,arguments)})},{key:"post",value:(s=p(a().mark(function t(e,r,n,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:r,params:n,config:s});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,r,n){return s.apply(this,arguments)})},{key:"put",value:(u=p(a().mark(function t(e,r,n,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:r,params:n,config:s});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,r,n){return u.apply(this,arguments)})},{key:"patch",value:(o=p(a().mark(function t(e,r,n,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:r,params:n,config:s});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,r,n){return o.apply(this,arguments)})},{key:"delete",value:(c=p(a().mark(function t(e,r,n,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:r,params:n,config:s});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t,e,r,n){return c.apply(this,arguments)})}]),f}(),q=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)}),P=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)}),C=function(){var t,e,n,s,u,o;function c(t){h(this,c),l(this,"httpRequest",void 0),this.httpRequest=new L(t)}return d(c,[{key:"getTask",value:(t=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="tasks/".concat(e),t.next=3,this.httpRequest.get(r);case 3:return n=t.sent,t.abrupt("return",new P(n));case 5:case"end":return t.stop()}},t,this)})),function(e){return t.apply(this,arguments)})},{key:"getTasks",value:(e=p(a().mark(function t(){var e,r,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("tasks",O(e));case 4:return r=t.sent,t.abrupt("return",i(i({},r),{},{results:r.results.map(function(t){return new P(t)})}));case 6:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"waitForTask",value:(n=p(a().mark(function t(e){var n,s,i,u,o,c,p,h=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=void 0===(s=(n=h.length>1&&void 0!==h[1]?h[1]:{}).timeOutMs)?5e3:s,o=void 0===(u=n.intervalMs)?50:u,c=Date.now();case 2:if(!(Date.now()-c<i)){t.next=12;break}return t.next=5,this.getTask(e);case 5:if(p=t.sent,[r.TASK_ENQUEUED,r.TASK_PROCESSING].includes(p.status)){t.next=8;break}return t.abrupt("return",p);case 8:return t.next=10,function(t){return N.apply(this,arguments)}(o);case 10:t.next=2;break;case 12:throw new S("timeout of ".concat(i,"ms has exceeded on process ").concat(e," when waiting a task to be resolved."));case 13:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"waitForTasks",value:(s=p(a().mark(function t(e){var r,n,s,i,u,o,c,p,h,f,d=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:s=void 0===(n=(r=d.length>1&&void 0!==d[1]?d[1]:{}).timeOutMs)?5e3:n,u=void 0===(i=r.intervalMs)?50:i,o=[],c=function(t){var e="u">typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=g(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,i=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){a=!0,s=t},f:function(){try{i||null==e.return||e.return()}finally{if(a)throw s}}}}(e),t.prev=3,c.s();case 5:if((p=c.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,o.push(f);case 11:t.next=5;break;case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(3),c.e(t.t0);case 18:return t.prev=18,c.f(),t.finish(18);case 21:return t.abrupt("return",o);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,r,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.post("tasks/cancel",{},O(e));case 4:return r=t.sent,t.abrupt("return",new q(r));case 6:case"end":return t.stop()}},t,this)})),function(){return u.apply(this,arguments)})},{key:"deleteTasks",value:(o=p(a().mark(function t(){var e,r,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.delete("tasks",{},O(e));case 4:return r=t.sent,t.abrupt("return",new q(r));case 6:case"end":return t.stop()}},t,this)})),function(){return o.apply(this,arguments)})}]),c}(),M=function(){var t,e,r,n,s,u,c,f,y,v,_,w,m,b,x,A,g,k,S,N,O,P,M,U,F,j,B,V,H,K,G,Y,X,W,z,Q,$,J,Z,tt,te,tr,tn,ts,ti,ta,tu,to,tc,tp,th,tf,td,tl,ty,tv,t_,tw,tm,tb,tx,tA,tg,tk,tI,tE,tT,tS,tD,tR,tN,tO,tL,tq,tP,tC,tM,tU,tF,tj,tB,tV,tH,tK;function tG(t,e,r){h(this,tG),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=r,this.httpRequest=new L(t),this.tasks=new C(t)}return d(tG,[{key:"search",value:(t=p(a().mark(function t(e,r,n){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,R(i({q:e},r)),void 0,n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(e,r,n){return t.apply(this,arguments)})},{key:"searchGet",value:(e=p(a().mark(function t(e,r,n){var s,u,o,c,p,h,f,d,l,y;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 I("The filter query parameter should be in string format when using searchGet")},y=i(i({q:e},r),{},{filter:l(null==r?void 0:r.filter),sort:null==r||null==(s=r.sort)?void 0:s.join(","),facets:null==r||null==(u=r.facets)?void 0:u.join(","),attributesToRetrieve:null==r||null==(o=r.attributesToRetrieve)?void 0:o.join(","),attributesToCrop:null==r||null==(c=r.attributesToCrop)?void 0:c.join(","),attributesToHighlight:null==r||null==(p=r.attributesToHighlight)?void 0:p.join(","),vector:null==r||null==(h=r.vector)?void 0:h.join(","),attributesToSearchOn:null==r||null==(f=r.attributesToSearchOn)?void 0:f.join(",")}),t.next=5,this.httpRequest.get(d,R(y),n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}},t,this)})),function(t,r,n){return e.apply(this,arguments)})},{key:"searchForFacetValues",value:(r=p(a().mark(function t(e,r){var n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/facet-search"),t.next=3,this.httpRequest.post(n,R(e),void 0,r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t,e){return r.apply(this,arguments)})},{key:"searchSimilarDocuments",value:(n=p(a().mark(function t(e){var r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/similar"),t.next=3,this.httpRequest.post(r,R(e),void 0);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"getRawInfo",value:(s=p(a().mark(function t(){var e,r;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 r=t.sent,this.primaryKey=r.primaryKey,this.updatedAt=new Date(r.updatedAt),this.createdAt=new Date(r.createdAt),t.abrupt("return",r);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:(c=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 c.apply(this,arguments)})},{key:"update",value:(f=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid),t.next=3,this.httpRequest.patch(r,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(t){return f.apply(this,arguments)})},{key:"delete",value:(y=p(a().mark(function t(){var e,r;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 r=t.sent,t.abrupt("return",new q(r));case 5:case"end":return t.stop()}},t,this)})),function(){return y.apply(this,arguments)})},{key:"getTasks",value:(v=p(a().mark(function t(){var e,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=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 v.apply(this,arguments)})},{key:"getTask",value:(_=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 _.apply(this,arguments)})},{key:"waitForTasks",value:(w=p(a().mark(function t(e){var r,n,s,i,u,o=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=void 0===(n=(r=o.length>1&&void 0!==o[1]?o[1]:{}).timeOutMs)?5e3:n,u=void 0===(i=r.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 r,n,s,i,u,o=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=void 0===(n=(r=o.length>1&&void 0!==o[1]?o[1]:{}).timeOutMs)?5e3:n,u=void 0===(i=r.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:(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,"/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 b.apply(this,arguments)})},{key:"getDocuments",value:(x=p(a().mark(function
2t(){var e,r,n,s,u,o,c,p=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===(e=R(e=p.length>0&&void 0!==p[0]?p[0]:{})).filter){t.next=16;break}return t.prev=3,r="indexes/".concat(this.uid,"/documents/fetch"),t.next=7,this.httpRequest.post(r,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 T?t.t0.message=D(t.t0.message,"getDocuments"):t.t0 instanceof E&&(t.t0.message=D(t.t0.message,"getDocuments")),t.t0;case 14:t.next=21;break;case 16:return o="indexes/".concat(this.uid,"/documents"),c=Array.isArray(null==(n=e)?void 0:n.fields)?{fields:null==(s=e)||null==(u=s.fields)?void 0:u.join(",")}:{},t.next=20,this.httpRequest.get(o,i(i({},e),c));case 21:case"end":return t.stop()}},t,this,[[3,10]])})),function(){return x.apply(this,arguments)})},{key:"getDocument",value:(A=p(a().mark(function t(e,r){var n,s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/documents/").concat(e),s=function(){if(Array.isArray(null==r?void 0:r.fields)){var t;return null==r||null==(t=r.fields)?void 0:t.join(",")}}(),t.next=4,this.httpRequest.get(n,R(i(i({},r),{},{fields:s})));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}},t,this)})),function(t,e){return A.apply(this,arguments)})},{key:"addDocuments",value:(g=p(a().mark(function t(e,r){var n,s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.post(n,e,r);case 3:return s=t.sent,t.abrupt("return",new q(s));case 5:case"end":return t.stop()}},t,this)})),function(t,e){return g.apply(this,arguments)})},{key:"addDocumentsFromString",value:(k=p(a().mark(function t(e,r,n){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,
2n,{headers:{"Content-Type":r}});case 3:return i=t.sent,t.abrupt("return",new q(i));case 5:case"end":return t.stop()}},t,this)})),function(t,e,r){return k.apply(this,arguments)})},{key:"addDocumentsInBatches",value:(S=p(a().mark(function t(e){var r,n,s,i,u=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=u.length>1&&void 0!==u[1]?u[1]:1e3,n=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+r),n);case 8:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 10:i+=r,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:(N=p(a().mark(function t(e,r){var n,s;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n="indexes/".concat(this.uid,"/documents"),t.next=3,this.httpRequest.put(n,e,r);case 3:return s=t.sent,t.abrupt("return",new q(s));case 5:case"end":return t.stop()}},t,this)})),function(t,e){return N.apply(this,arguments)})},{key:"updateDocumentsInBatches",value:(O=p(a().mark(function t(e){var r,n,s,i,u=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=u.length>1&&void 0!==u[1]?u[1]:1e3,n=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+r),n);case 8:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 10:i+=r,t.next=4;break;case 13:return t.abrupt("return",s);case 14:case"end":return t.stop()}},t,this)})),function(t){return O.apply(this,arguments)})},{key:"updateDocumentsFromString",value:(P=p(a().mark(function t(e,r,n){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,n,{headers:{"Content-Type":r}});case 3:return i=t.sent,t.abrupt("return",new q(i));case 5:case"end":return t.stop()}},t,this)})),function(t,e,r){return P.apply(this,arguments)})},{key:"deleteDocument",value:(M=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/documents/").concat(e),t.next=3,this.httpRequest.delete(r);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(t){return M.apply(this,arguments)})},{key:"deleteDocuments",value:(U=p(a().mark(function t(e){var r,n,s,i;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=!Array.isArray(e)&&"object"===o(e))?"documents/delete":"documents/delete-batch",s="indexes/".concat(this.uid,"/").concat(n),t.prev=3,t.next=6,this.httpRequest.post(s,e);case 6:return i=t.sent,t.abrupt("return",new q(i));case 10:throw t.prev=10,t.t0=t.catch(3),t.t0 instanceof T&&r?t.t0.message=D(t.t0.message,"deleteDocuments"):t.t0 instanceof E&&(t.t0.message=D(t.t0.message,"deleteDocuments")),t.t0;case 14:case"end":return t.stop()}},t,this,[[3,10]])})),function(t){return U.apply(this,arguments)})},{key:"deleteAllDocuments",value:(F=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return F.apply(this,arguments)})},{key:"updateDocumentsByFunction",value:(j=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/documents/edit"),t.next=3,this.httpRequest.post(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return j.apply(this,arguments)})},{key:"getSettings",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"),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:"updateSettings",value:(V=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings"),t.next=3,this.httpRequest.patch(r,e);case 3:return(n=t.sent).enqueued=new Date(n.enqueuedAt),t.abrupt("return",n);case 6:case"end":return t.stop()}},t,this)})),function(t){return V.apply(this,arguments)})},{key:"resetSettings",value:(H=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return H.apply(this,arguments)})},{key:"getPagination",value:(K=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 K.apply(this,arguments)})},{key:"updatePagination",value:(G=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/pagination"),t.next=3,this.httpRequest.patch(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return G.apply(this,arguments)})},{key:"resetPagination",value:(Y=p(a().mark(function t(){var e,r;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 r=t.sent,t.abrupt("return",new q(r));case 5:case"end":return t.stop()}},t,this)})),function(){return Y.apply(this,arguments)})},{key:"getSynonyms",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,"/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 X.apply(this,arguments)})},{key:"updateSynonyms",value:(W=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/synonyms"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return W.apply(this,arguments)})},{key:"resetSynonyms",value:(z=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return z.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:($=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/stop-words"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return $.apply(this,arguments)})},{key:"resetStopWords",value:(J=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return J.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:(tt=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/ranking-rules"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tt.apply(this,arguments)})},{key:"resetRankingRules",value:(te=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return te.apply(this,arguments)})},{key:"getDistinctAttribute",value:(tr=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 tr.apply(this,arguments)})},{key:"updateDistinctAttribute",value:(tn=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/distinct-attribute"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tn.apply(this,arguments)})},{key:"resetDistinctAttribute",value:(ts=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return ts.apply(this,arguments)})},{key:"getFilterableAttributes",value:(ti=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 ti.apply(this,arguments)})},{key:"updateFilterableAttributes",value:(ta=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/filterable-attributes"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return ta.apply(this,arguments)})},{key:"resetFilterableAttributes",value:(tu=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return tu.apply(this,arguments)})},{key:"getSortableAttributes",value:(to=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 to.apply(this,arguments)})},{key:"updateSortableAttributes",value:(tc=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/sortable-attributes"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tc.apply(this,arguments)})},{key:"resetSortableAttributes",value:(tp=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return tp.apply(this,arguments)})},{key:"getSearchableAttributes",value:(th=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 th.apply(this,arguments)})},{key:"updateSearchableAttributes",value:(tf=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/searchable-attributes"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tf.apply(this,arguments)})},{key:"resetSearchableAttributes",value:(td=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return td.apply(this,arguments)})},{key:"getDisplayedAttributes",value:(tl=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 tl.apply(this,arguments)})},{key:"updateDisplayedAttributes",value:(ty=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/displayed-attributes"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return ty.apply(this,arguments)})},{key:"resetDisplayedAttributes",value:(tv=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);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:(tw=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/typo-tolerance"),t.next=3,this.httpRequest.patch(r,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(t){return tw.apply(this,arguments)})},{key:"resetTypoTolerance",value:(tm=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return tm.apply(this,arguments)})},{key:"getFaceting",value:(tb=p(a().
2mark(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 tb.apply(this,arguments)})},{key:"updateFaceting",value:(tx=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/faceting"),t.next=3,this.httpRequest.patch(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tx.apply(this,arguments)})},{key:"resetFaceting",value:(tA=p(a().mark(function t(){var e,r;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 r=t.sent,t.abrupt("return",new q(r));case 5:case"end":return t.stop()}},t,this)})),function(){return tA.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:(tk=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/separator-tokens"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tk.apply(this,arguments)})},{key:"resetSeparatorTokens",value:(tI=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return tI.apply(this,arguments)})},{key:"getNonSeparatorTokens",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/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 tE.apply(this,arguments)})},{key:"updateNonSeparatorTokens",value:(tT=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/non-separator-tokens"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tT.apply(this,arguments)})},{key:"resetNonSeparatorTokens",value:(tS=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return tS.apply(this,arguments)})},{key:"getDictionary",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/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 tD.apply(this,arguments)})},{key:"updateDictionary",value:(tR=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/dictionary"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tR.apply(this,arguments)})},{key:"resetDictionary",value:(tN=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return tN.apply(this,arguments)})},{key:"getProximityPrecision",value:(tO=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 tO.apply(this,arguments)})},{key:"updateProximityPrecision",value:(tL=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/proximity-precision"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tL.apply(this,arguments)})},{key:"resetProximityPrecision",value:(tq=p(a().mark(function t(){var e,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return tq.apply(this,arguments)})},{key:"getEmbedders",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/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 tP.apply(this,arguments)})},{key:"updateEmbedders",value:(tC=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/embedders"),t.next=3,this.httpRequest.patch(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));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,r;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(r=t.sent).enqueuedAt=new Date(r.enqueuedAt),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)})),function(){return tM.apply(this,arguments)})},{key:"getSearchCutoffMs",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/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 tU.apply(this,arguments)})},{key:"updateSearchCutoffMs",value:(tF=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/search-cutoff-ms"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tF.apply(this,arguments)})},{key:"resetSearchCutoffMs",value:(tj=p(a().mark(function t(){var e,r;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 r=t.sent,t.abrupt("return",new q(r));case 5:case"end":return t.stop()}},t,this)})),function(){return tj.apply(this,arguments)})},{key:"getLocalizedAttributes",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/localized-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 tB.apply(this,arguments)})},{key:"updateLocalizedAttributes",value:(tV=p(a().mark(function t(e){var r,n;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="indexes/".concat(this.uid,"/settings/localized-attributes"),t.next=3,this.httpRequest.put(r,e);case 3:return n=t.sent,t.abrupt("return",new q(n));case 5:case"end":return t.stop()}},t,this)})),function(t){return tV.apply(this,arguments)})},{key:"resetLocalizedAttributes",value:(tH=p(a().mark(function t(){var e,r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e="indexes/".concat(this.uid,"/settings/localized-attributes"),t.next=3,this.httpRequest.delete(e);case 3:return r=t.sent,t.abrupt("return",new q(r));case 5:case"end":return t.stop()}},t,this)})),function(){return tH.apply(this,arguments)})}],[{key:"create",value:(tK=p(a().mark(function t(e){var r,n,s,u=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},n=new L(u.length>2?u[2]:void 0),t.next=6,n.post("indexes",i(i({},r),{},{uid:e}));case 6:return s=t.sent,t.abrupt("return",new q(s));case 8:case"end":return t.stop()}},t)})),function(t){return tK.apply(this,arguments)})}]),tG}(),U=function(t){y(r,t);var e=A(r);function r(t){return h(this,r),e.call(this,t)}return d(r)}(function(){var t,e,r,s,u,o,c,f,y,v,_,w,m,b,x,A,g,k,I,E,T,S,D,R,N,O,P;function U(t){h(this,U),l(this,"config",void 0),l(this,"httpRequest",void 0),l(this,"tasks",void 0),this.config=t,this.httpRequest=new L(t),this.tasks=new C(t)}return d(U,[{key:"index",value:function(t){return new M(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 M(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 M(this.config,e).getRawInfo());case 1:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"getIndexes",value:(r=p(a().mark(function t(){var e,r,n,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 n=(r=t.sent).results.map(function(t){return new M(s.config,t.uid,t.primaryKey)}),t.abrupt("return",i(i({},r),{},{results:n}));case 6:case"end":return t.stop()}},t,this)})),function(){return r.apply(this,arguments)})},{key:"getRawIndexes",value:(s=p(a().mark(function t(){var e,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("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 r,n=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},t.next=3,M.create(e,r,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:(o=p(a().mark(function t(e){var r,n=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},t.next=3,new M(this.config,e).update(r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return o.apply(this,arguments)})},{key:"deleteIndex",value:(c=p(a().mark(function t(e){return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new M(this.config,e).delete();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t,this)})),function(t){return c.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!==n.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:(y=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
2s",e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return y.apply(this,arguments)})},{key:"multiSearch",value:(v=p(a().mark(function t(e,r){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,r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t,e){return v.apply(this,arguments)})},{key:"getTasks",value:(_=p(a().mark(function t(){var e,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=3,this.tasks.getTasks(e);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:(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 r,n,s,i,u,o=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=void 0===(n=(r=o.length>1&&void 0!==o[1]?o[1]:{}).timeOutMs)?5e3:n,u=void 0===(i=r.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:(b=p(a().mark(function t(e){var r,n,s,i,u,o=arguments;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=void 0===(n=(r=o.length>1&&void 0!==o[1]?o[1]:{}).timeOutMs)?5e3:n,u=void 0===(i=r.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 b.apply(this,arguments)})},{key:"cancelTasks",value:(x=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 x.apply(this,arguments)})},{key:"deleteTasks",value:(A=p(a().mark(function t(){var e,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=3,this.tasks.deleteTasks(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(){return A.apply(this,arguments)})},{key:"getKeys",value:(g=p(a().mark(function t(){var e,r,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("keys",e);case 4:return(r=t.sent).results=r.results.map(function(t){return i(i({},t),{},{createdAt:new Date(t.createdAt),updatedAt:new Date(t.updatedAt)})}),t.abrupt("return",r);case 7:case"end":return t.stop()}},t,this)})),function(){return g.apply(this,arguments)})},{key:"getKey",value:(k=p(a().mark(function t(e){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.get(r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}},t,this)})),function(t){return k.apply(this,arguments)})},{key:"createKey",value:(I=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 I.apply(this,arguments)})},{key:"updateKey",value:(E=p(a().mark(function t(e,r){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.patch(n,r);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 r;return a().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r="keys/".concat(e),t.next=3,this.httpRequest.delete(r);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 q(e));case 5:case"end":return t.stop()}},t,this)})),function(){return O.apply(this,arguments)})},{key:"createSnapshot",value:(P=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 q(e));case 5:case"end":return t.stop()}},t,this)})),function(){return P.apply(this,arguments)})},{key:"generateTenantToken",value:function(t,e,r){var n=Error();return n.message="Meilisearch: failed to generate a tenant token. Generation of a token only w
2orks in a node environment \n ".concat(n.stack,"."),Promise.reject(n)}}]),U}());e.ContentTypeEnum={JSON:"application/json",CSV:"text/csv",NDJSON:"application/x-ndjson"},e.ErrorStatusCode=n,e.Index=M,e.MatchingStrategies={ALL:"all",LAST:"last",FREQUENCY:"frequency"},e.MeiliSearch=U,e.MeiliSearchApiError=E,e.MeiliSearchError=I,e.MeiliSearchRequestError=T,e.MeiliSearchTimeOutError=S,e.Meilisearch=U,e.TaskStatus=r,e.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"},e.default=U,e.versionErrorHintMessage=D,Object.defineProperty(e,"__esModule",{value:!0})}(r)},970129,t=>{"use strict";var e=t.i(416056),r=t.i(61892);class n extends e.MeiliSearch{index(t){return super.index((0,r.worktreeIndex)(t))}}t.s(["WorktreeMeiliSearch",0,n])},61892,t=>{"use strict";var e=t.i(362220);t.s(["worktreeIndex",0,function(t){let r=e.default.env.NEXT_PUBLIC_MEILI_INDEX_PREFIX??"";return r&&!t.startsWith(r)?`${r}${t}`:t}])}]); 3 4//# debugId=932d9ce7-81b9-eeba-2e59-a58a6bbcb823 5//# sourceMappingURL=3z_k7pnwg5_zi.js.map
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.