PageSourceSearch

https://www.maccosmetics.com/cdn/shop/t/199/assets/fetchWithCache.BJ12kVQ7.min.js

js maccosmetics.com collected 2026-10-02 02:31:28 UTC 2,064 bytes, 1 lines download raw bytes

1const e=new Map,t=e=>(null==e?void 0:e.reason)??new DOMException("The operation was aborted.","AbortError");function r(t){t.waiters-=1,t.waiters<=0&&(e.delete(t.key),t.controller.abort(new DOMException("All callers aborted.","AbortError")))}function o(e,o){e.waiters+=1;const n=e.promise.then(e=>e.clone());return o?o.aborted?(r(e),Promise.reject(t(o))):new Promise((a,s)=>{const c=()=>{r(e),s(t(o))};o.addEventListener("abort",c,{once:!0}),n.then(e=>{o.removeEventListener("abort",c),a(e)},e=>{o.removeEventListener("abort",c),s(e)})}):n}async function n(e,t,r,o){const n={...t,signal:r.signal};let a;try{a=await fetch(e,n)}catch(s){if(r.signal.aborted)throw s;a=await fetch(e,n)}if(!a.ok||204===a.status||205===a.status)return a;try{const e=await a.clone().text(),t={};a.headers.forEach((e,r)=>{t[r]=e}),localStorage.setItem(o,JSON.stringify({timestamp:Date.now(),body:e,headers:t}))}catch{}return a}function a(e,t=[],r=6e4){try{const o=c(e,t),n=localStorage.getItem(o);if(!n)return null;const{timestamp:a,body:s}=JSON.parse(n);if(Date.now()-a<r)return s;localStorage.removeItem(o)}catch{}return null}async function s(t,r={},a=[],s=6e4){try{const l=c(t,a),h=Date.now();if("GET"!==(r.method??"GET").toUpperCase())return await fetch(t,r);try{const e=localStorage.getItem(l);if(e){const{timestamp:t,body:r,headers:o}=JSON.parse(e);if(h-t<s)return new Response(r,{headers:o});localStorage.removeItem(l)}}catch(i){}const d=e.get(l);if(d)return o(d,r.signal);const f=new AbortController,u={key:l,controller:f,waiters:0,promise:n(t,r,f,l)};return e.set(l,u),u.promise.then(()=>e.delete(l),()=>e.delete(l)),o(u,r.signal)}catch(i){return fetch(t,r)}}const c=(e,t=[])=>{var r;const o="undefined"!=typeof window&&(null==(r=window.location)?void 0:r.origin)?window.location.origin:"http://localhost",n=new URL(e,o);return n.hash="",t.forEach(e=>n.searchParams.delete(e)),`fetch-cache:${function(e){let t,r,o=0;for(t=0;t<e.length;t++)r=e.charCodeAt(t),o=(o<<5)-o+r,o|=0;return(o>>>0).toString(16).padStart(8,"0")}(n.pathname+(n.search?n.search:""))}`};export{s as f,a as r};

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.