PageSourceSearch

https://www.zalando.be/sw.js

js zalando.be collected 2026-10-02 02:54:47 UTC 8,157 bytes, 1 lines download raw bytes

1!function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function t(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))}function n(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function r(e,t){for(var n=0,r=t.length,a=e.length;n<r;n++,a++)e[a]=t[n];return e}try{self["workbox:core:6.1.2"]&&_()}catch(e){}const a=(e,...t)=>{let n=e;return t.length>0&&(n+=` :: ${JSON.stringify(t)}`),n};class o extends Error{constructor(e,t){super(a(e,t)),this.name=e,this.details=t}}"undefined"!=typeof registration&&registration.scope;const i={readonly:["get","count","getKey","getAll","getAllKeys"],readwrite:["add","put","clear","delete"]};for(const[e,t]of Object.entries(i))for(const e of t);var s,c=function(e){return Math.floor(e.length?e.reduce((function(t,n){return t+n/e.length}),0):0)};function u(t){void 0===t&&(t=new Set);var n=Array.from(t).map((function(e){return(self.performance.getEntriesByName(e)||[])[0]})).filter((function(e){return e instanceof PerformanceResourceTiming})).reduce((function(t,n){var a,o=function(e){try{return new URL(e).hostname}catch(e){return"unknown"}}(n.name),i=0===n.transferSize?1:0,s=t[o]?t[o].size:[];return n.transferSize>0&&s.push(n.transferSize),e(e({},t),((a={})[o]={total:t[o]?t[o].total+1:1,fromCache:(t[o]?t[o].fromCache:0)+i,latency:r(r([],t[o]?t[o].latency:[]),[n.duration]),size:s},a))}),{});return Object.keys(n).reduce((function(t,r){var a;return e(e({},t),((a={})[r]={total:n[r].total,"from-cache":n[r].fromCache,"latency-avg":c(n[r].latency),"size-avg":c(n[r].size)},a))}),{})}var l,h=["mosaic01.ztat.net","mosaic02.ztat.net","mosaic03.ztat.net","mosaic04.ztat.net","img01.ztat.net"],f=(l=new Map,{interceptCmagRequests:function(r,a,o){return!!function(e,t){var n=e.headers.get("x-page-type"),r=e.headers.get("x-zalando-feature");return t.pathname.endsWith("/api/cmag")&&n&&r}(r,a)&&(function(r,a,o){t(void 0,void 0,void 0,(function(){var t,i,s,c,l,h,f,d,p,g;return n(this,(function(n){switch(n.label){case 0:return t=u(o.get(a))||{},i=Object.keys(t).reduce((function(n,r){var a;return e(e({},n),((a={})["image-"+r+"-total"]=t[r].total,a["image-"+r+"-from-cache"]=t[r]["from-cache"],a["image-"+r+"-latency-avg"]=t[r]["latency-avg"],a["image-"+r+"-size-avg"]=t[r]["size-avg"],a))}),{}),s=Object.keys(t).reduce((function(e,n){return e+t[n]["size-avg"]}),0),c=fetch,l=[r.clone()],h=[e({},r)],g={},d=(f=JSON).stringify,p=[{}],[4,r.json()];case 1:return c.apply(void 0,l.concat([e.apply(void 0,h.concat([(g.body=d.apply(f,[e.apply(void 0,[e.apply(void 0,[e.apply(void 0,p.concat([n.sent()])),i]),{"image-size-total":s}])]),g)]))])).catch(console.error),o.delete(a),[2]}}))}))}(r,o,l),!0)},interceptImageRequests:function(e,t,n){return!("image"!==e.destination||!h.includes(t.hostname)||(function(e){clearTimeout(s),s=setTimeout((function(){e.clear()}),6e4)}(l),l.has(n)||l.set(n,new Set),l.get(n).add(e.url),0))},interceptNavigationChange:function(e,t){return"document"===e.destination&&l.delete(t),!1}}),d=function(e){return"clientId"in e},p=[{match:function(e){var t=e.request,n=e.event,r=e.url;if(!d(n))return!1;var a=n.clientId;return f.interceptCmagRequests(t,r,a)},handler:function(){return t(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,new Response(null,{status:204})]}))}))},method:"POST"},{match:function(e){var t=e.request,n=e.event,r=e.url;if(!d(n))return!1;var a=n.clientId;return f.interceptImageRequests(t,r,a)},handler:function(e){var t=e.request;return fetch(t)},method:"GET"},{match:function(e){var t=e.request,n=e.event;if(!d(n))return!1;var r=n.clientId;return f.interceptNavigationChange(t,r)},method:"GET"}];
1try{self["workbox:routing:6.1.2"]&&_()}catch(e){}const g=e=>e&&"object"==typeof e?e:{handle:e};class m{constructor(e,t,n="GET"){this.handler=g(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=g(e)}}class v extends m{constructor(e,t,n){super((({url:t})=>{const n=e.exec(t.href);if(n&&(t.origin===location.origin||0===n.index))return n.slice(1)}),t,n)}}class y{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map((t=>{"string"==typeof t&&(t=[t]);const n=new Request(...t);return this.handleRequest({request:n,event:e})})));e.waitUntil(n),e.ports&&e.ports[0]&&n.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const r=n.origin===location.origin,{params:a,route:o}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n});let i=o&&o.handler;const s=e.method;if(!i&&this._defaultHandlerMap.has(s)&&(i=this._defaultHandlerMap.get(s)),!i)return;let c;try{c=i.handle({url:n,request:e,event:t,params:a})}catch(e){c=Promise.reject(e)}const u=o&&o.catchHandler;return c instanceof Promise&&(this._catchHandler||u)&&(c=c.catch((async r=>{if(u)try{return await u.handle({url:n,request:e,event:t,params:a})}catch(e){r=e}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw r}))),c}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){const a=this._routes.get(n.method)||[];for(const o of a){let a;const i=o.match({url:e,sameOrigin:t,request:n,event:r});if(i)return a=i,(Array.isArray(i)&&0===i.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"==typeof i)&&(a=void 0),{route:o,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,g(e))}setCatchHandler(e){this._catchHandler=g(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new o("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new o("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let w;self.skipWaiting(),self.addEventListener("activate",(()=>self.clients.claim())),function(e){void 0===e&&(e=[]),e.forEach((function(e){var t=e.match,n=e.handler,r=e.method;!function(e,t,n){let r;if("string"==typeof e){const a=new URL(e,location.href);r=new m((({url:e})=>e.href===a.href),t,n)}else if(e instanceof RegExp)r=new v(e,t,n);else if("function"==typeof e)r=new m(e,t,n);else{if(!(e instanceof m))throw new o("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});r=e}(w||(w=new y,w.addFetchListener(),w.addCacheListener()),w).registerRoute(r)}(t,n,void 0===r?"GET":r)}))}(r([],p))}();

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.