1import{lq as O,jP as m,lA as w,gF as v,fa as L,jq as I,iZ as A,fh as b,iv as K,bS as S}from"./CETDtVAK.js";const x=(e,t,n)=>{if(e==null||t==null)return-1;if(!t.length)return 0;e=e.toString().toLocaleLowerCase(),t=t.toString().toLocaleLowerCase();const s=[];let l=e.indexOf(t);for(;~l;)s.push([l,l+t.length]),l=e.indexOf(t,l+t.length);return s.length?s:-1};function _(e,t){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,e+t.length]]:Array.isArray(e[0])?e:[e]}const $=A({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function C(e,t,n){const s=[],l=n?.default??x,a=n?.filterKeys?w(n.filterKeys):!1,f=Object.keys(n?.customKeyFilter??{}).length;if(!e?.length)return s;let c=null;e:for(let r=0;r<e.length;r++){const[i,F=i]=w(e[r]),d={},u={};let o=-1;if((t||f>0)&&!n?.noFilter){let p=!1;if(typeof i=="object"){if(i.type==="divider"||i.type==="subheader"){c?.type==="divider"&&i.type==="subheader"&&s.push(c),c={index:r,matches:{},type:i.type};continue}const y=a||Object.keys(F);p=y.length===f;for(const M of y){const j=v(F,M),k=n?.customKeyFilter?.[M];if(o=k?k(j,t,i):l(j,t,i),o!==-1&&o!==!1)k?d[M]=_(o,t):u[M]=_(o,t);else if(n?.filterMode==="every")continue e}}else o=l(i,t,i),o!==-1&&o!==!1&&(u.title=_(o,t));const h=Object.keys(u).length,g=Object.keys(d).length;if(!h&&!g||n?.filterMode==="union"&&g!==f&&!h||n?.filterMode==="intersection"&&(g!==f||!h&&f>0&&!p))continue}c&&(s.push(c),c=null),s.push({index:r,matches:{...u,...d}})}return s}function B(e,t,n,s){const l=I([]),a=I(new Map),f=L(()=>s?.transform?m(t).map(r=>[r,s.transform(r)]):m(t));O(()=>{const r=typeof n=="function"?n():m(n),i=typeof r!="string"&&typeof r!="number"?"":String(r),F=C(f.value,i,{customKeyFilter:{...e.customKeyFilter,...m(s?.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=m(t),u=[],o=new Map;F.forEach(p=>{let{index:h,matches:g}=p;const y=d[h];u.push(y),o.set(y.value,g)}),l.value=u,a.value=o});function c(r){return a.value.get(r.value)}return{filteredItems:l,filteredMatches:a,getMatches:c}}function E(e,t,n){return n==null||!n.length?t:n.map((s,l)=>{const a=l===0?0:n[l-1][1],f=[b("span",{class:K(`${e}__unmask`)},[t.slice(a,s[0])]),b("span",{class:K(`${e}__mask`)},[t.slice(s[0],s[1])])];return l===n.length-1&&f.push(b("span",{class:K(`${e}__unmask`)},[t.slice(s[1])])),b(S,null,[f])})}export{E as h,$ as m,B 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.