1import{a as q,g as S,i as $,b as k}from"./DrctnP21.js";var T={INDEX_NOT_FOUND:"index_not_found"},u=class extends Error{name="MeilisearchError"},m=class extends u{name="MeilisearchApiError";cause;response;constructor(t,e){super(e?.message??`${t.status}: ${t.statusText}`),this.response=t,e!==void 0&&(this.cause=e)}},w=class extends u{name="MeilisearchRequestError";constructor(t,e){super(`Request to ${t} has failed`,{cause:e})}},b=class extends u{name="MeilisearchRequestTimeOutError";cause;constructor(t,e){super(`request timed out after ${t}ms`),this.cause={timeout:t,requestInit:e}}},v=class extends u{name="MeilisearchTaskTimeOutError";cause;constructor(t,e){super(`timeout of ${e}ms has exceeded on task ${t} when waiting for it to be resolved.`),this.cause={taskUid:t,timeout:e}}},A={version:"0.59.0"};function D(t){return t.startsWith("https://")||t.startsWith("http://")?t:`http://${t}`}function I(t){return t.endsWith("/")||(t+="/"),t}async function F(t){let e=t.getReader(),s=new TextDecoder,i="";for(;;){let{done:a,value:r}=await e.read();if(a)break;i+=s.decode(r,{stream:!0})}return i+=s.decode(),i}function E(t){let e=t.trim();if(!e)return[];try{let s=JSON.parse(e);return Array.isArray(s)?s:[s]}catch{return e.split(/\r?\n/).flatMap(s=>s.split(new RegExp("(?<=})\\s*(?=\\{)"))).map(s=>s.trim()).filter(s=>s.length>0).map(s=>JSON.parse(s))}}function P(t,e){for(let[s,i]of Object.entries(e))i!=null&&t.set(s,Array.isArray(i)?i.join():i instanceof Date?i.toISOString():String(i))}function C(t,e){let s="X-Meilisearch-Client",i=`Meilisearch JavaScript (v${A.version})`,a="Content-Type",r="Authorization",n=new Headers(e);if(t.apiKey&&!n.has(r)&&n.set(r,`Bearer ${t.apiKey}`),n.has(a)||n.set(a,"application/json"),t.clientAgents!==void 0){let h=t.clientAgents.concat(i);n.set(s,h.join(" ; "))}else n.set(s,i);return n}var d=Symbol("<timeout>");function f(t,e){let{signal:s}=t,i=new AbortController;if(s!=null){let a=null;if(s.aborted)i.abort(s.reason);else{let r=()=>i.abort(s.reason);s.addEventListener("abort",r,{once:!0}),a=()=>s.removeEventListener("abort",r),i.signal.addEventListener("abort",a,{once:!0})}return()=>{if(s.aborted)return;let r=setTimeout(()=>i.abort(d),e),n=()=>{clearTimeout(r),a!==null&&i.signal.removeEventListener("abort",a)};return s.addEventListener("abort",n,{once:!0}),()=>{s.removeEventListener("abort",n),n()}}}return t.signal=i.signal,()=>{let a=setTimeout(()=>i.abort(d),e);return()=>clearTimeout(a)}}var c=class{#t;#s;#i;#e;constructor(t){let e=I(D(t.host));try{this.#t=new URL(e)}catch(s){throw new u("The provided host is not valid",{cause:s})}this.#s={...t.requestInit,headers:C(t,t.requestInit?.headers)},this.#i=t.httpClient,this.#e=t.timeout}#r(t,e){if(t===void 0&&e===void 0)return this.#s.headers;let s=new Headers(t);e!==void 0&&!s.has("Content-Type")&&s.set("Content-Type",e);for(let[i,a]of this.#s.headers)s.has(i)||s.set(i,a);return s}#n({path:t,method:e,params:s,contentType:i,body:a,extraRequestInit:r}){let n=new URL(t,this.#t);return s!==void 0&&P(n.searchParams,s),{url:n,init:{method:e,body:i===void 0||typeof a!="string"?JSON.stringify(a):a,...r,...this.#s,headers:this.#r(r?.headers,i)}}}async#a(t){let{url:e,init:s}=this.#n(t),i=(this.#e===void 0?null:f(s,this.#e))?.(),a,r;try{if(this.#i!==void 0)return await this.#i(e,s);a=await fetch(e,s),r=await a.text()}catch(h){throw new w(e.toString(),Object.is(h,d)?new b(this.#e,s):h)}finally{i?.()}let n=r===""?void 0:JSON.parse(r);if(!a.ok)throw new m(a,n);return n}get(t){return this.#a(t)}getStream(t){return this.#h(t)}post(t){return this.#a({...t,method:"POST"})}put(t){return this.#a({...t,method:"PUT"})}patch(t){return this.#a({...t,method:"PATCH"})}delete(t){return this.#a({...t,method:"DELETE"})}postStream(t){return this.#h({...t,method:"POST"})}async#h(t){let{url:e,init:s}=this.#n(t),i=(this.#e===void 0?null:f(s,this.#e))?.(),a;try{if(this.#i!==void 0){let r=await this.#i(e,s);if(!(r instanceof ReadableStream))throw new u("Custom HTTP client must return a ReadableStream for streaming requests");return r}a=await fetch(e,s)}catch(r){throw new w(e.toString(),Object.is(r,d)?new b(this.#e,s):r)}finally{i?.()}if(!a.ok){let r=await a.text(),n=r===""?void 0:JSON.parse(r);
1throw new m(a,n)}if(!a.body)throw new u("Response body is null - server did not return a readable stream");return a.body}},x=Symbol("<task timeout>");function R(t){return function(e){return Object.defineProperty(e,"waitTask",{async value(s){return await t.waitForTask(await e,s)}})}}var O=t=>typeof t=="number"?t:t.taskUid,l=class{#t;#s;#i;#e;constructor(t,e){this.#t=t,this.#s=e?.timeout??5e3,this.#i=e?.interval??50,this.#e=R(this)}async getTask(t,e){return await this.#t.get({path:`tasks/${t}`,extraRequestInit:e})}async getTasks(t){return await this.#t.get({path:"tasks",params:t})}async getTaskDocuments(t,e){return E(await F(await this.#t.getStream({path:`tasks/${t}/documents`,extraRequestInit:e})))}async waitForTask(t,e){let s=O(t),i=e?.timeout??this.#s,a=e?.interval??this.#i,r=i>0?new AbortController:null,n=r===null?void 0:setTimeout(()=>{r.abort(x)},i);try{for(;;){let h=await this.getTask(s,{signal:r?.signal});if(h.status!=="enqueued"&&h.status!=="processing")return clearTimeout(n),h;a>0&&await new Promise(p=>setTimeout(p,a))}}catch(h){throw Object.is(h.cause,x)?new v(s,i):h}}async*waitForTasksIter(t,e){for await(let s of t)yield await this.waitForTask(s,e)}async waitForTasks(...t){let e=[];for await(let s of this.waitForTasksIter(...t))e.push(s);return e}cancelTasks(t){return this.#e(this.#t.post({path:"tasks/cancel",params:t}))}deleteTasks(t){return this.#e(this.#t.delete({path:"tasks",params:t}))}};function g(t,e){let s=R(e);return{post:(...i)=>s(t.post(...i)),put:(...i)=>s(t.put(...i)),patch:(...i)=>s(t.patch(...i)),delete:(...i)=>s(t.delete(...i))}}var o=class{uid;primaryKey;createdAt;updatedAt;httpRequest;tasks;#t;constructor(t,e,s){this.uid=e,this.primaryKey=s,this.httpRequest=new c(t),this.tasks=new l(this.httpRequest,t.defaultWaitOptions),this.#t=g(this.httpRequest,this.tasks)}async search(t,e,s){return await this.httpRequest.post({path:`indexes/${this.uid}/search`,body:{q:t,...e},extraRequestInit:s})}async searchGet(t,e,s){let i=r=>{if(typeof r=="string")return r;if(Array.isArray(r))throw new u("The filter query parameter should be in string format when using searchGet")},a={q:t,...e,filter:i(e?.filter),sort:e?.sort?.join(","),facets:e?.facets?.join(","),attributesToRetrieve:e?.attributesToRetrieve?.join(","),attributesToCrop:e?.attributesToCrop?.join(","),attributesToHighlight:e?.attributesToHighlight?.join(","),vector:e?.vector?.join(","),attributesToSearchOn:e?.attributesToSearchOn?.join(",")};return await this.httpRequest.get({path:`indexes/${this.uid}/search`,params:a,extraRequestInit:s})}async searchForFacetValues(t,e){return await this.httpRequest.post({path:`indexes/${this.uid}/facet-search`,body:t,extraRequestInit:e})}async searchSimilarDocuments(t){return await this.httpRequest.post({path:`indexes/${this.uid}/similar`,body:t})}async getRawInfo(){let t=await this.httpRequest.get({path:`indexes/${this.uid}`});return this.primaryKey=t.primaryKey,this.updatedAt=new Date(t.updatedAt),this.createdAt=new Date(t.createdAt),t}async fetchInfo(){return await this.getRawInfo(),this}async fetchPrimaryKey(){return this.primaryKey=(await this.getRawInfo()).primaryKey,this.primaryKey}static create(t,e={},s){let i=new c(s);return g(i,new l(i)).post({path:"indexes",body:{...e,uid:t}})}update(t){return this.#t.patch({path:`indexes/${this.uid}`,body:t})}delete(){return this.#t.delete({path:`indexes/${this.uid}`})}async getStats(){return await this.httpRequest.get({path:`indexes/${this.uid}/stats`})}async getDocuments(t){let e=`indexes/${this.uid}/documents`,s=t?{...t}:void 0;return s&&Array.isArray(s.sort)&&s.sort.length===0&&delete s.sort,s?.filter===void 0?await this.httpRequest.get({path:e,params:s}):await this.httpRequest.post({path:`${e}/fetch`,body:s})}async getDocument(t,e){let s=Array.isArray(e?.fields)?e.fields.join():void 0;return await this.httpRequest.get({path:`indexes/${this.uid}/documents/${t}`,params:{...e,fields:s}})}addDocuments(t,e){return this.#t.post({path:`indexes/${this.uid}/documents`,params:e,body:t})}addDocumentsFromString(t,e,s){return this.#t.post({path:`indexes/${this.uid}/documents`,body:t,params:s,contentType:e})}addDocumentsInBatches(t,e=1e3,s){let i=[];for(let a=0;a<t.length;a+=e)i.push(this.addDocuments(t.slice(a,a+e),s));return i}updateDocuments(t,e){return this.#t.put({path:`indexes/${this.uid}/documents`,params:e,body:t})}updateDocumentsInBatches(t,e=1e3,s){let i=[];for(let a=0;a<t.length;a+=e)i.push(this.updateDocuments(t.slice(a,a+e),s));return i}updateDocumentsFromString(t,e,s){return this.#t.put({path:`indexes/${this.uid}/documents`,body:t,params:s,contentType:e})}deleteDocument(t,e){return this.#t.delete({path:`indexes/${this.uid}/documents/${t}`,params:e})}deleteDocuments(t,e){let s=!Array.isArray(t)&&typeof t=="object"?"documents/delete":"documents/delete-batch";return this.#t.post({path:`indexes/${this.uid}/${s}`,body:t,params:e})}deleteAllDocuments(t){return this.#t.delete({path:`indexes/${this.uid}/documents`,params:t})}updateDocumentsByFunction(t,e){return this.#t.post({path:`indexes/${this.uid}/documents/edit`,body:t,params:e})}async getSettings(){return await this.httpRequest.get({path:`indexes/${this.uid}
1/settings`})}updateSettings(t){return this.#t.patch({path:`indexes/${this.uid}/settings`,body:t})}resetSettings(){return this.#t.delete({path:`indexes/${this.uid}/settings`})}async getPagination(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/pagination`})}updatePagination(t){return this.#t.patch({path:`indexes/${this.uid}/settings/pagination`,body:t})}resetPagination(){return this.#t.delete({path:`indexes/${this.uid}/settings/pagination`})}async getSynonyms(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/synonyms`})}updateSynonyms(t){return this.#t.put({path:`indexes/${this.uid}/settings/synonyms`,body:t})}resetSynonyms(){return this.#t.delete({path:`indexes/${this.uid}/settings/synonyms`})}async getStopWords(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/stop-words`})}updateStopWords(t){return this.#t.put({path:`indexes/${this.uid}/settings/stop-words`,body:t})}resetStopWords(){return this.#t.delete({path:`indexes/${this.uid}/settings/stop-words`})}async getRankingRules(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/ranking-rules`})}updateRankingRules(t){return this.#t.put({path:`indexes/${this.uid}/settings/ranking-rules`,body:t})}resetRankingRules(){return this.#t.delete({path:`indexes/${this.uid}/settings/ranking-rules`})}async getDistinctAttribute(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/distinct-attribute`})}updateDistinctAttribute(t){return this.#t.put({path:`indexes/${this.uid}/settings/distinct-attribute`,body:t})}resetDistinctAttribute(){return this.#t.delete({path:`indexes/${this.uid}/settings/distinct-attribute`})}async getFilterableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/filterable-attributes`})}updateFilterableAttributes(t){return this.#t.put({path:`indexes/${this.uid}/settings/filterable-attributes`,body:t})}resetFilterableAttributes(){return this.#t.delete({path:`indexes/${this.uid}/settings/filterable-attributes`})}async getSortableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/sortable-attributes`})}updateSortableAttributes(t){return this.#t.put({path:`indexes/${this.uid}/settings/sortable-attributes`,body:t})}resetSortableAttributes(){return this.#t.delete({path:`indexes/${this.uid}/settings/sortable-attributes`})}async getSearchableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/searchable-attributes`})}updateSearchableAttributes(t){return this.#t.put({path:`indexes/${this.uid}/settings/searchable-attributes`,body:t})}resetSearchableAttributes(){return this.#t.delete({path:`indexes/${this.uid}/settings/searchable-attributes`})}async getDisplayedAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/displayed-attributes`})}updateDisplayedAttributes(t){return this.#t.put({path:`indexes/${this.uid}/settings/displayed-attributes`,body:t})}resetDisplayedAttributes(){return this.#t.delete({path:`indexes/${this.uid}/settings/displayed-attributes`})}async getTypoTolerance(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/typo-tolerance`})}updateTypoTolerance(t){return this.#t.patch({path:`indexes/${this.uid}/settings/typo-tolerance`,body:t})}resetTypoTolerance(){return this.#t.delete({path:`indexes/${this.uid}/settings/typo-tolerance`})}async getFaceting(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/faceting`})}updateFaceting(t){return this.#t.patch({path:`indexes/${this.uid}/settings/faceting`,body:t})}resetFaceting(){return this.#t.delete({path:`indexes/${this.uid}/settings/faceting`})}async getSeparatorTokens(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/separator-tokens`})}updateSeparatorTokens(t){return this.#t.put({path:`indexes/${this.uid}/settings/separator-tokens`,body:t})}resetSeparatorTokens(){return this.#t.delete({path:`indexes/${this.uid}/settings/separator-tokens`})}async getNonSeparatorTokens(){return await this.httpRequest.get({path:`indexes/${this.uid}
1/settings/non-separator-tokens`})}updateNonSeparatorTokens(t){return this.#t.put({path:`indexes/${this.uid}/settings/non-separator-tokens`,body:t})}resetNonSeparatorTokens(){return this.#t.delete({path:`indexes/${this.uid}/settings/non-separator-tokens`})}async getDictionary(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/dictionary`})}updateDictionary(t){return this.#t.put({path:`indexes/${this.uid}/settings/dictionary`,body:t})}resetDictionary(){return this.#t.delete({path:`indexes/${this.uid}/settings/dictionary`})}async getProximityPrecision(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/proximity-precision`})}updateProximityPrecision(t){return this.#t.put({path:`indexes/${this.uid}/settings/proximity-precision`,body:t})}resetProximityPrecision(){return this.#t.delete({path:`indexes/${this.uid}/settings/proximity-precision`})}async getEmbedders(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/embedders`})}updateEmbedders(t){return this.#t.patch({path:`indexes/${this.uid}/settings/embedders`,body:t})}resetEmbedders(){return this.#t.delete({path:`indexes/${this.uid}/settings/embedders`})}async getSearchCutoffMs(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/search-cutoff-ms`})}updateSearchCutoffMs(t){return this.#t.put({path:`indexes/${this.uid}/settings/search-cutoff-ms`,body:t})}resetSearchCutoffMs(){return this.#t.delete({path:`indexes/${this.uid}/settings/search-cutoff-ms`})}async getLocalizedAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/localized-attributes`})}updateLocalizedAttributes(t){return this.#t.put({path:`indexes/${this.uid}/settings/localized-attributes`,body:t})}resetLocalizedAttributes(){return this.#t.delete({path:`indexes/${this.uid}/settings/localized-attributes`})}async getForeignKeys(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/foreign-keys`})}updateForeignKeys(t){return this.#t.put({path:`indexes/${this.uid}/settings/foreign-keys`,body:t})}resetForeignKeys(){return this.#t.delete({path:`indexes/${this.uid}/settings/foreign-keys`})}async getFacetSearch(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/facet-search`})}updateFacetSearch(t){return this.#t.put({path:`indexes/${this.uid}/settings/facet-search`,body:t})}resetFacetSearch(){return this.#t.delete({path:`indexes/${this.uid}/settings/facet-search`})}async getPrefixSearch(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/prefix-search`})}updatePrefixSearch(t){return this.#t.put({path:`indexes/${this.uid}/settings/prefix-search`,body:t})}resetPrefixSearch(){return this.#t.delete({path:`indexes/${this.uid}/settings/prefix-search`})}async getChat(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/chat`})}updateChat(t){return this.#t.patch({path:`indexes/${this.uid}/settings/chat`,body:t})}async getFields(t,e){return await this.httpRequest.post({path:`indexes/${this.uid}/fields`,body:t||{},extraRequestInit:e})}},j=class{#t;constructor(t){this.#t=t}async getBatch(t){return await this.#t.get({path:`batches/${t}`})}async getBatches(t){return await this.#t.get({path:"batches",params:t})}},K=class{#t;#s;constructor(t,e){this.#t=t,this.#s=e}async get(){return await this.#t.get({path:`chats/${this.#s}/settings`})}async update(t){return await this.#t.patch({path:`chats/${this.#s}/settings`,body:t})}async reset(){await this.#t.delete({path:`chats/${this.#s}/settings`})}async streamCompletion(t){if(!t.stream)throw Error("The SDK only supports streaming");return await this.#t.postStream({path:`chats/${this.#s}/chat/completions`,body:t})}},N=class{config;httpRequest;#t;get tasks(){return this.#t}#s;get batches(){return this.#s}#i;constructor(t){this.config=t,this.httpRequest=new c(t),this.#t=new l(this.httpRequest,t.defaultWaitOptions),this.#s=new j(this.httpRequest),this.#i=g(this.httpRequest,this.tasks)}index(t){return new o(this.config,t)}async getIndex(t){return new o(this.config,t).fetchInfo()}async getRawIndex(t){return new o(this.config,t).getRawInfo()}async getIndexes(t){let e=await this.getRawIndexes(t),s=e.results.map(i=>new o(this.config,i.uid,i.primaryKey));return{...e,results:s}}async getRawIndexes(t){return await this.httpRequest.get({path:"indexes",params:t})}createIndex(t,e){return o.create(t,e,this.config)}updateIndex(t,e){return new o(this.config,t).update(e)}deleteIndex(t){return new o(this.config,t).delete()}async deleteIndexIfExists(t){try{return await this.deleteIndex(t),!0}catch(e){if(e?.cause?.code===T.INDEX_NOT_FOUND)return!1;throw e}}
1swapIndexes(t){return this.#i.post({path:"swap-indexes",body:t})}async multiSearch(t,e){return await this.httpRequest.post({path:"multi-search",body:t,extraRequestInit:e})}chat(t){return new K(this.httpRequest,t)}async getChatWorkspaces(){return await this.httpRequest.get({path:"chats"})}async getDynamicSearchRules(t){return await this.httpRequest.post({path:"dynamic-search-rules",body:t??{}})}async getDynamicSearchRule(t){return await this.httpRequest.get({path:`dynamic-search-rules/${t}`})}async updateDynamicSearchRule(t,e){return await this.httpRequest.patch({path:`dynamic-search-rules/${t}`,body:e})}async deleteDynamicSearchRule(t){await this.httpRequest.delete({path:`dynamic-search-rules/${t}`})}async getWebhooks(){return await this.httpRequest.get({path:"webhooks"})}async getWebhook(t){return await this.httpRequest.get({path:`webhooks/${t}`})}async createWebhook(t){return await this.httpRequest.post({path:"webhooks",body:t})}async updateWebhook(t,e){return await this.httpRequest.patch({path:`webhooks/${t}`,body:e})}async deleteWebhook(t){await this.httpRequest.delete({path:`webhooks/${t}`})}#e(t){return this.#i.patch({path:"network",body:t})}#r(t,e){let s=Object.entries(e);if(s.length===0)throw TypeError("initializeNetwork requires at least one shard when leader is set.");let i={};for(let[a,r]of s){if(!Array.isArray(r.remotes)||r.remotes.length===0)throw TypeError(`Shard "${a}" must have at least one remote.`);let n=r.remotes.filter(h=>t[h]===void 0);if(n.length>0)throw TypeError(`Shard "${a}" references unknown remotes: ${n.join(", ")}`);i[a]={remotes:[...r.remotes]}}return i}async getNetwork(){return await this.httpRequest.get({path:"network"})}initializeNetwork(t){let e=this.#r(t.remotes,t.shards);return this.#e({self:t.self,leader:t.self,remotes:t.remotes,shards:e})}addRemote(t){return this.#e({remotes:{[t.name]:t.remote}})}removeRemote(t){return this.#e({remotes:{[t.name]:null}})}addRemotesToShard(t,e){return this.#e({shards:{[t]:{addRemotes:e}}})}removeRemotesFromShard(t,e){return this.#e({shards:{[t]:{removeRemotes:e}}})}async getKeys(t){let e=await this.httpRequest.get({path:"keys",params:t});return e.results=e.results.map(s=>({...s,createdAt:new Date(s.createdAt),updatedAt:new Date(s.updatedAt)})),e}async getKey(t){return await this.httpRequest.get({path:`keys/${t}`})}async createKey(t){return await this.httpRequest.post({path:"keys",body:t})}async updateKey(t,e){return await this.httpRequest.patch({path:`keys/${t}`,body:e})}async deleteKey(t){await this.httpRequest.delete({path:`keys/${t}`})}async health(){return await this.httpRequest.get({path:"health"})}async isHealthy(){try{let{status:t}=await this.health();return t==="available"}catch{return!1}}async getStats(){return await this.httpRequest.get({path:"stats"})}async getVersion(){return await this.httpRequest.get({path:"version"})}createDump(){return this.#i.post({path:"dumps"})}createSnapshot(){return this.#i.post({path:"snapshots"})}async renderTemplate(t){return await this.httpRequest.post({path:"render-template",body:t})}async getExperimentalFeatures(){return await this.httpRequest.get({path:"experimental-features"})}async updateExperimentalFeatures(t){return await this.httpRequest.patch({path:"experimental-features",body:t})}};function W(){const t=q(),{meilisearchClient:{hostUrl:e,searchApiKey:s}}=S().public;return t._meilisearchClient||(t._meilisearchClient=new N({host:e,apiKey:s})),t._meilisearchClient}function _(t){const e=W(),s=$(`${t}-search-result`,()=>null);return{search:async(a,r)=>{const n=await e.index(t).search(a,r);return s.value=n,n},result:s}}const L=()=>{const{locale:t}=k(),e=r=>{switch(r){case"innovation":return"/taten/projekte";case"challenge":return"/taten/challenges";case"magazine":return"/worte/magazin";case"video":return"/worte/videos";case"podcast":return"/worte/podcasts";case"job":return"/wir/jobs";case"event":return"/worte/veranstaltungen";default:return"/"}},s=(r,n)=>{for(const h of n){if((t.value==="de"?h.related?.slug_de:h.related?.slug_en)===r)return h.path;if(h.items&&h.items.length>0){const y=s(r,h.items);if(y)return y}}return null},i=$("landing_pages");return{generateSlug:(r,n)=>r==="page"?i?s(n,i.value)||"/"+n:"#":r==="landing"?"/":`${e(r)}/${n}`}};export{L as a,_ as u};
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.