!function(){const e=e=>{try{return e.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[""'']/g,'"').replace(/[–—]/g,"-").replace(/[^\p{L}\p{N}]+/gu," ").replace(/\btempltes\b/g,"templates").replace(/\btemplte\b/g,"template").replace(/\bforun\b/g,"forum").replace(/\bforumn\b/g,"forum").replace(/\bsettign\b/g,"setting").replace(/\bsettin\b/g,"setting").replace(/\bplugni\b/g,"plugin").replace(/\bpluginn\b/g,"plugin").replace(/\badmni\b/g,"admin").replace(/\busres\b/g,"users").replace(/\busre\b/g,"user").replace(/\bdashbaord\b/g,"dashboard").replace(/\bdashbord\b/g,"dashboard").trim().toLowerCase()}catch{return String(e||"").toLowerCase()}},t=(t,r)=>{const o=t[e(r)]||[];return Array.from(new Set(o))},r=(r,o)=>{const s=[r.title,r.excerpt,r.content,r.author,...r.tags||[],r.category].filter(Boolean).map(t=>e(String(t))),n=new Set;for(const e of s){const r=e.split(/\s+/).filter(Boolean);for(const e of r){n.add(e);const r=t(o,e);for(const e of r)n.add(e)}}return Array.from(n).join(" ")},o=(t,r)=>({...t,id:r,type:t.type,title:t.title?e(t.title):"",excerpt:t.excerpt?e(t.excerpt):"",content:t.content?e(t.content):"",author:t.author?e(t.author):"",tags:Array.isArray(t.tags)?t.tags.map(t=>e(String(t))).join(" "):t.tags?e(String(t.tags)):"",category:t.category?e(t.category):"",phonetics:t.title?e(t.title).split(/\s+/).filter(Boolean).map(t=>(t=>{const r=e(t);if(!r)return"";const o=r[0],s={b:"1",f:"1",p:"1",v:"1",c:"2",g:"2",j:"2",k:"2",q:"2",s:"2",x:"2",z:"2",d:"3",t:"3",l:"4",m:"5",n:"5",r:"6"};let n="";const a=[];for(let e=1;e<r.length;e++){const t=s[r[e]]||"";t&&t!==n&&a.push(t),n=t}return(o.toUpperCase()+(a.join("")+"000").slice(0,3)).slice(0,4)})(t)).filter(Boolean).join(" "):""});self.onmessage=e=>{const t=e.data;if(t&&"build"===t.type)try{const{items:e,synonyms:s={}}=t,n=e.length,a=[],c=250;for(let t=0;t<e.length;t++){const l=e[t],p=`${l.type}:${l.id}`,g=r(l,s),i=o(l,p);if(a.push({compositeId:p,searchableText:g,normalizedDoc:i}),(t+1)%c===0){const e={type:"progress",processed:t+1,total:n};self.postMessage(e)}}const l={type:"done",processed:n,total:n,entries:a};self.postMessage(l)}catch(s){const e={type:"error",message:s?.message||String(s||"Unknown error")};self.postMessage(e)}}}();
//# sourceMappingURL=indexBuilder.worker-BmBygKlR.js.map
