PageSourceSearch

https://www.pret.co.uk/_next/static/chunks/1379-fb744e28d9d6f280.js

js pret.co.uk collected 2026-10-01 11:58:19 UTC 12,661 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1379],{30953:(t,e)=>{"use strict";t.exports=function(t){let e=[],s=t,o={take:i,release:r,test:function(){return!(s<1)&&i()&&!0}};return Object.defineProperty(o,"count",{get:t=>s,enumerable:!0}),o;function i(t){return s>0?(--s,Promise.resolve(r)):new Promise((o,i)=>{e.push(t=>{--s,o(r)}),t&&setTimeout(s=>{e.shift();let o=Error(`Timed out after ${t}ms`);o.code="ETIMEDOUT",i(o)},t)})}function r(){s++,e.length>0&&e.shift()()}}},44171:(t,e,s)=>{"use strict";let o=Symbol("window"),i=Symbol("buckets"),r=Symbol("timeout"),n=Symbol("percentiles"),h=Symbol("bucket-interval"),a=Symbol("snapshot-interval"),l=Symbol("rotate-event-name"),c=s(69319).EventEmitter;class u extends c{constructor(t){super(),this[i]=t.rollingCountBuckets||10,this[r]=t.rollingCountTimeout||1e4,this[o]=Array(this[i]),this[n]=[0,.25,.5,.75,.9,.95,.99,.995,1],this[l]="rotate",this.rollingPercentilesEnabled=!1!==t.rollingPercentilesEnabled,this.enableSnapshots=!1!==t.enableSnapshots,this.rotateBucketController=t.rotateBucketController,this.rotateBucket=p(this[o]);for(let t=0;t<this[i];t++)this[o][t]=m();const e=Math.floor(this[r]/this[i]);this.rotateBucketController?this.startListeneningForRotateEvent():(this[h]=setInterval(this.rotateBucket,e),"function"==typeof this[h].unref&&this[h].unref()),this.enableSnapshots&&(this[a]=setInterval(t=>this.emit("snapshot",this.stats),e),"function"==typeof this[a].unref&&this[a].unref()),t.stats&&(this[o][0]={...m(),...t.stats})}get stats(){let t=this[o].reduce((t,e)=>(e&&(Object.keys(t).forEach(s=>{"latencyTimes"!==s&&"percentiles"!==s&&(t[s]+=e[s]||0)}),this.rollingPercentilesEnabled&&e.latencyTimes&&(t.latencyTimes=t.latencyTimes.concat(e.latencyTimes))),t),m());return this.rollingPercentilesEnabled?(t.latencyTimes.sort((t,e)=>t-e),t.latencyTimes.length?t.latencyMean=t.latencyTimes.reduce((t,e)=>t+e,0)/t.latencyTimes.length:t.latencyMean=0,this[n].forEach(e=>{t.percentiles[e]=function(t,e){if(0===t)return e[0]||0;let s=Math.ceil(t*e.length);return e[s-1]||0}(e,t.latencyTimes)})):(t.latencyMean=-1,this[n].forEach(e=>{t.percentiles[e]=-1})),t}get window(){return this[o].slice()}increment(t,e){this[o][0][t]++,("successes"===t||"failures"===t||"timeouts"===t)&&this[o][0].latencyTimes.push(e||0)}open(){this[o][0].isCircuitBreakerOpen=!0}close(){this[o][0].isCircuitBreakerOpen=!1}shutdown(){this.removeAllListeners(),void 0===this.rotateBucketController?clearInterval(this[h]):this.removeRotateBucketControllerListener(),this.enableSnapshots&&clearInterval(this[a])}removeRotateBucketControllerListener(){this.rotateBucketController&&this.rotateBucketController.removeListener(this[l],this.rotateBucket)}startListeneningForRotateEvent(){this.rotateBucketController&&0===this.rotateBucketController.listenerCount(this[l],this.rotateBucket)&&this.rotateBucketController.on(this[l],this.rotateBucket)}}let p=t=>e=>{t.pop(),t.unshift(m())},m=t=>({failures:0,fallbacks:0,successes:0,rejects:0,fires:0,timeouts:0,cacheHits:0,cacheMisses:0,coalesceCacheHits:0,coalesceCacheMisses:0,semaphoreRejections:0,percentiles:{},latencyTimes:[]});t.exports=u},51379:(t,e,s)=>{"use strict";t.exports=s(91648)},75645:(t,e)=>{class s{constructor(t){this.cache=new Map,this.maxEntries=t??0xffffff}get(t){let e=this.cache.get(t);if(e){if(e.expiresAt>Date.now()||0===e.expiresAt)return e.value;this.cache.delete(t)}}set(t,e,s){this.cache.size===this.maxEntries&&void 0===this.get(t)&&this.cache.delete(this.cache.keys().next().value),this.cache.set(t,{expiresAt:s,value:e})}delete(t){this.cache.delete(t)}flush(){this.cache.clear()}}t.exports=s},91648:(t,e,s)=>{"use strict";let o=s(69319),i=s(44171),r=s(30953),n=s(75645),h=Symbol("state"),a=Symbol("open"),l=Symbol("closed"),c=Symbol("half-open"),u=Symbol("pending-close"),p=Symbol("shutdown"),m=Symbol("fallback"),f=Symbol("status"),b=Symbol("name"),d=Symbol("group"),T=Symbol("Enabled"),y=Symbol("warming-up"),C=Symbol("volume-threshold"),g=Symbol("our-error"),w=Symbol("reset-timeout"),x=Symbol("warmup-timeout"),k=Symbol("last-timer-at");class S extends o{static isOurError(t){return!!t[g]}static newStatus(t){return new i(t)}constructor(t,e={}){if(super(),this.options=e,this.options.timeout=e.timeout??1e4,this.options.resetTimeout=e.resetTimeout??3e4,this.options.errorThresholdPercentage=e.errorThresholdPercentage??50,this.options.rollingCountTimeout=e.rolling
1CountTimeout??1e4,this.options.rollingCountBuckets=e.rollingCountBuckets??10,this.options.rollingPercentilesEnabled=!1!==e.rollingPercentilesEnabled,this.options.capacity=Number.isInteger(e.capacity)?e.capacity:Number.MAX_SAFE_INTEGER,this.options.errorFilter=e.errorFilter||(t=>!1),this.options.cacheTTL=e.cacheTTL??0,this.options.cacheGetKey=e.cacheGetKey??((...t)=>JSON.stringify(t)),this.options.enableSnapshots=!1!==e.enableSnapshots,this.options.rotateBucketController=e.rotateBucketController,this.options.coalesce=!!e.coalesce,this.options.coalesceTTL=e.coalesceTTL??this.options.timeout,this.options.coalesceResetOn=e.coalesceResetOn?.filter(t=>["error","success","timeout"].includes(t))||[],this.options.cache){if(void 0===this.options.cacheTransport)this.options.cacheTransport=new n(e.cacheSize);else if("object"!=typeof this.options.cacheTransport||!this.options.cacheTransport.get||!this.options.cacheTransport.set||!this.options.cacheTransport.flush)throw TypeError("options.cacheTransport should be an object with `get`, `set` and `flush` methods")}if(this.options.coalesce&&(this.options.coalesceCache=new n(e.coalesceSize)),this.semaphore=new r(this.options.capacity),!t)throw TypeError("No action provided. Cannot construct a CircuitBreaker without an invocable action.");if(e.autoRenewAbortController&&!e.abortController&&(e.abortController=new AbortController),e.abortController&&"function"!=typeof e.abortController.abort)throw TypeError("AbortController does not contain `abort()` method");if(this[C]=Number.isInteger(e.volumeThreshold)?e.volumeThreshold:0,this[y]=!0===e.allowWarmUp,this.options.status?this.options.status instanceof i?this[f]=this.options.status:this[f]=new i({stats:this.options.status}):this[f]=new i(this.options),this[h]=l,e.state?(this[T]=!1!==e.state.enabled,this[y]=e.state.warmUp||this[y],this[l]=!1!==e.state.closed,this[c]=this[u]=e.state.halfOpen||!1,this[a]=!this[l]&&!this[c],this[p]=e.state.shutdown||!1):(this[u]=!1,this[T]=!1!==e.enabled),this[m]=null,this[b]=e.name||t.name||O(),this[d]=e.group||this[b],this[y]){const t=this[x]=setTimeout(t=>this[y]=!1,this.options.rollingCountTimeout);"function"==typeof t.unref&&t.unref()}"function"!=typeof t?this.action=e=>Promise.resolve(t):this.action=t,e.maxFailures&&console.error("options.maxFailures is deprecated. Please use options.errorThresholdPercentage");const s=t=>(e,s)=>this[f].increment(t,s);function o(t){t[h]=c,t[u]=!0,t._renewAbortControllerIfNeeded(),t.emit("halfOpen",t.options.resetTimeout)}this.on("success",s("successes")),this.on("failure",s("failures")),this.on("fallback",s("fallbacks")),this.on("timeout",s("timeouts")),this.on("fire",s("fires")),this.on("reject",s("rejects")),this.on("cacheHit",s("cacheHits")),this.on("cacheMiss",s("cacheMisses")),this.on("coalesceCacheHit",s("coalesceCacheHits")),this.on("coalesceCacheMiss",s("coalesceCacheMisses")),this.on("open",t=>this[f].open()),this.on("close",t=>this[f].close()),this.on("semaphoreLocked",s("semaphoreRejections")),this.on("open",function(t){return t[k]=Date.now(),e=>{let s=t[w]=setTimeout(()=>{o(t)},t.options.resetTimeout);"function"==typeof s.unref&&s.unref()}}(this)),this.on("success",t=>{this.halfOpen&&this.close()}),this[p]?(this[h]=p,this.shutdown()):this[l]?this.close():this[a]?void 0!==this.options.state.lastTimerAt&&Date.now()-this.options.state.lastTimerAt>this.options.resetTimeout?o(this):this.open():this[c]&&(this[h]=c)}_renewAbortControllerIfNeeded(){this.options.autoRenewAbortController&&this.options.abortController&&this.options.abortController.signal.aborted&&(this.options.abortController=new AbortController)}close(){this[h]!==l&&(this[w]&&clearTimeout(this[w]),this[h]=l,this[u]=!1,this._renewAbortControllerIfNeeded(),this.emit("close"))}open(){this[h]!==a&&(this[h]=a,this[u]=!1,this.emit("open"))}shutdown(){this.emit("shutdown"),this.disable(),this.removeAllListeners(),this[w]&&clearTimeout(this[w]),this[x]&&clearTimeout(this[x]),this.status.shutdown(),this[h]=p,this.clearCache()}get isShutdown(){return this[h]===p}get name(){return this[b]}get group(){return this[d]}get pendingClose(){return this[u]}get closed(){return this[h]===l}get opened(){return this[h]===a}get halfOpen(){return this[h]===c}get status(){return this[f]}get stats(){return this[f].stats}toJSON(){return{state:{name:this.name,enabled:this.enabled,closed:this.closed,open:this.opened,halfOpen:this.halfOpen,warmUp:this.warmUp,shutdown:this.isShutdown,lastTimerAt:this[k]},status:this.status.stats}}get enabled(){return this[T]}get warmUp(){return this[y]}get volumeThreshold(){return this[C]}fallback(t){let e=t;return t instanceof S&&(e=(...e)=>t.fire(...e)),this[m]=e,this}fire(...t){return this.call(this.action,...t)}call(t,...e){let s;if(this.isShutdown)return Promise.reject(P("The circuit has been shutdown.","ESHUTDOWN"));let o=e.slice();
1if(this.emit("fire",o),!this[T]){let e=this.action.apply(t,o);return"function"==typeof e.then?e:Promise.resolve(e)}let i=this.options.cache||this.options.coalesce?this.options.cacheGetKey.apply(this,e):"";if(this.options.cache){let t=this.options.cacheTransport.get(i);if(t)return this.emit("cacheHit"),t;this.emit("cacheMiss")}if(this.options.coalesce){let t=this.options.coalesceCache.get(i);if(t)return this.emit("coalesceCacheHit"),t;this.emit("coalesceCacheMiss")}if(!this.closed&&!this.pendingClose){let t=P("Breaker is open","EOPENBREAKER");return this.emit("reject",t),v(this,t,o)||Promise.reject(t)}this[u]=!1;let r=!1,n=new Promise((e,n)=>{let h=Date.now();if(this.semaphore.test()){this.options.timeout&&(s=setTimeout(()=>{r=!0;let t=P(`Timed out after ${this.options.timeout}ms`,"ETIMEDOUT"),a=Date.now()-h;this.semaphore.release(),this.emit("timeout",t,a,o),E(t,this,s,o,a,e,n),B(this,i,"timeout"),this.options.abortController&&this.options.abortController.abort()},this.options.timeout));try{let a=this.action.apply(t,o),l="function"==typeof a.then?a:Promise.resolve(a);l.then(t=>{!r&&(clearTimeout(s),this.emit("success",t,Date.now()-h),B(this,i,"success"),this.semaphore.release(),e(t),this.options.cache&&this.options.cacheTransport.set(i,l,this.options.cacheTTL>0?Date.now()+this.options.cacheTTL:0))}).catch(t=>{if(!r){this.semaphore.release();let r=Date.now()-h;E(t,this,s,o,r,e,n),B(this,i,"error")}})}catch(r){this.semaphore.release();let t=Date.now()-h;E(r,this,s,o,t,e,n),B(this,i,"error")}}else{let t=Date.now()-h,r=P("Semaphore locked","ESEMLOCKED");this.emit("semaphoreLocked",r,t),E(r,this,s,o,t,e,n),B(this,i)}});return this.options.coalesce&&this.options.coalesceCache.set(i,n,this.options.coalesceTTL>0?Date.now()+this.options.coalesceTTL:0),n}clearCache(){this.options.cache&&this.options.cacheTransport.flush(),this.options.coalesceCache&&this.options.coalesceCache.flush()}healthCheck(t,e){if(e=e||5e3,"function"!=typeof t)throw TypeError("Health check function must be a function");if(isNaN(e))throw TypeError("Health check interval must be a number");let s=e=>{t.apply(this).catch(t=>{this.emit("healthCheckFailed",t),this.open()})},o=setInterval(s,e);"function"==typeof o.unref&&o.unref(),s()}enable(){this[T]=!0,this.status.startListeneningForRotateEvent()}disable(){this[T]=!1,this.status.removeRotateBucketControllerListener()}getSignal(){if(this.options.abortController&&this.options.abortController.signal)return this.options.abortController.signal}getAbortController(){return this.options.abortController}}function E(t,e,s,o,i,r,n){if(clearTimeout(s),e.options.errorFilter(t,...o))e.emit("success",t,i);else{!function(t,e,s,o){if(t.emit("failure",e,o,s),t.warmUp)return;let i=t.stats;i.fires<t.volumeThreshold&&!t.halfOpen||(i.failures/i.fires*100>t.options.errorThresholdPercentage||t.halfOpen)&&t.open()}(e,t,o,i);let s=v(e,t,o);if(s)return r(s)}n(t)}function v(t,e,s){if(t[m])try{let o=t[m].apply(t[m],[...s,e]);if(t.emit("fallback",o,e),o instanceof Promise)return o;return Promise.resolve(o)}catch(t){return Promise.reject(t)}}function B(t,e,s){(!s||t.options.coalesceResetOn.includes(s))&&t.options.coalesceCache?.delete(e)}function P(t,e){let s=Error(t);return s.code=e,s[g]=!0,s}let O=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)});t.exports=S}}]);
2//# sourceMappingURL=1379-fb744e28d9d6f280.js.map

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.