1var e=`cdn.sanity.io`,t=[480,768,1024,1440,1920];function n(t){return!!t&&t.includes(e)}function r(e,t={}){if(!n(e))return e;let[r]=e.split(`?`),i=new URLSearchParams;return t.width&&i.set(`w`,String(t.width)),t.height&&i.set(`h`,String(t.height)),i.set(`fit`,t.fit??`max`),t.fit===`crop`&&i.set(`crop`,`center`),i.set(`auto`,`format`),i.set(`q`,String(t.quality??78)),`${r}?${i.toString()}`}function i(e,i={}){if(n(e))return t.map(t=>`${r(e,{...i,width:t})} ${t}w`).join(`, `)}function a(e,t=`(min-width: 768px) 720px, 100vw`){if(!e)return e;let a=e.replace(/<span class=['"]av-structured-data['"][\s\S]*?<\/span>/gi,``).replace(/<span class='av-structured-data'[\s\S]*?<\/span>/gi,``);return a=a.replace(/<img\b[^>]*>/gi,e=>{let a=e.match(/\ssrc=["']([^"']+)["']/i)?.[1];if(!a||!n(a))return e;let o=e.replace(/\ssrcset=["'][^"']*["']/gi,``).replace(/\ssizes=["'][^"']*["']/gi,``).replace(/\sloading=["'][^"']*["']/gi,``).replace(/\sdecoding=["'][^"']*["']/gi,``).replace(/\ssrc=["'][^"']+["']/i,` src="${r(a,{width:1024})}"`),s=` srcset="${i(a)}" sizes="${t}" loading="lazy" decoding="async"`;return o.replace(/\s*\/?>$/,`${s} />`)}),a=a.replace(/url\((['"]?)(https:\/\/cdn\.sanity\.io\/[^)'"]+)\1\)/gi,(e,t,n)=>`url(${t}${r(n,{width:1920})}${t})`),a}export{i as n,r,a as t};
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.