1import{t as m,i as I,p as v,a as k}from"./deviceAppIdsBqiQQIm5.js";function A(t){return v(t).pkg}function w(t){return m(I(t.platform)?t.platform:"android",t.pkg)}function g(t,a){const r=k(t.pkg);return r?{platform:r,pkg:t.pkg.slice(r.length+1)}:{platform:I(a==null?void 0:a.platform)?a.platform:"android",pkg:t.pkg}}function N(t,a={}){const r=new Map;for(const n of t||[])for(const e of(n==null?void 0:n.apps)||[]){if(!(e!=null&&e.pkg))continue;const{platform:o,pkg:s}=g(e,n),d=m(o,s),p=r.get(d);if(!p){r.set(d,{...e,pkg:s,platform:o});continue}const i=p.removed===!0&&e.removed===!0,f=i?Math.min(p.removedAt??Number.POSITIVE_INFINITY,e.removedAt??Number.POSITIVE_INFINITY):Number.POSITIVE_INFINITY;r.set(d,{...p,...e,pkg:s,platform:o,removed:i?!0:void 0,removedAt:Number.isFinite(f)?f:void 0,androidCategory:p.androidCategory??e.androidCategory,isSystem:p.isSystem||e.isSystem||void 0,label:p.label||e.label})}return[...r.values()].filter(n=>a.includeRemoved||!n.removed).sort((n,e)=>(n.label||n.pkg).localeCompare(e.label||e.pkg))}function S(t){const a=new Set,r=new Map,c=new Map,n=new Set;for(const o of t||[]){const s=o==null?void 0:o.deviceId;if(s){a.add(s);for(const d of(o==null?void 0:o.apps)||[]){if(!(d!=null&&d.pkg)||d.removed)continue;const{platform:p,pkg:i}=g(d,o),f=m(p,i),l=r.get(f)??new Set;l.add(s),r.set(f,l);const u=c.get(f)??new Set;u.add(p),c.set(f,u),n.add(p)}}}const e=new Map;for(const[o,s]of r)e.set(o,s.size);return{deviceCount:a.size,countByAppId:e,platformsByAppId:new Map([...c].map(([o,s])=>
1[o,[...s]])),platforms:[...n]}}export{w as a,S as d,A as f,N as m};
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.