PageSourceSearch

https://www.pret.co.uk/_next/static/chunks/pages/click-and-collect…/[outpostLocationId]-cafa65e0e5cde440.js

js pret.co.uk collected 2026-10-01 11:59:27 UTC 9,966 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6138],{34185:(e,t,o)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/click-and-collect/outposts/[outpostLocationId]",function(){return o(66276)}])},66276:(e,t,o)=>{"use strict";o.r(t),o.d(t,{__N_SSP:()=>X,default:()=>G});var a=o(63857),s=o(60180),i=o.n(s),n=o(14232),r=o(89099),l=o.n(r);o(29123);var d=o(29454),c=o(17300);o(97743);var u=o(95112),p=o(48377),m=o(70974),f=o(53228);o(95079),o(70739),o(56410),o(25129),o(70562),o(72051),o(99742).env.OUTPOST_WARNING_PERIOD_MINUTES;var g=o(43181),h=(0,g.default)("li",{target:"epeoyw45"})({name:"1omhy7e",styles:"margin-left:0.25rem;margin-right:0.25rem;border-top-width:1px;--tw-border-opacity:1;border-color:rgb(231 228 228 / var(--tw-border-opacity, 1));"}),x=(0,g.default)("div",{target:"epeoyw44"})({name:"1pgsbkc",styles:"margin-left:-0.5rem;margin-right:-0.5rem;margin-top:0.5rem;margin-bottom:0.5rem;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding-left:0.25rem;padding-right:0.25rem;padding-top:0.75rem;padding-bottom:0.75rem;text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;:focus{--tw-shadow:0 0 0 1px rgba(167, 145, 95, .5);
1--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);}"}),w=(0,g.default)("div",{target:"epeoyw43"})({name:"cy6wnj",styles:"display:flex;width:100%;flex-direction:column;justify-content:space-between;padding-top:0.25rem;padding-bottom:0.25rem;"}),y=(0,g.default)("h4",{target:"epeoyw42"})({name:"1q88g7l",styles:"font-size:18px;font-weight:700;@media (min-width: 768px){font-size:20px;}"}),v=(0,g.default)("p",{target:"epeoyw41"})({name:"1kuy7z7",styles:"font-size:14px;"}),j=(0,g.default)(c.Button,{target:"epeoyw40"})(""),b=o(37876);let T=function(e){var t=e.onTimeSlotSelected,o=e.timeslot,a=e.cutoffTimeEnabled,s=e.setTimeslot,i=e.setCutoffModal,n=o.slot,r=o.isAvailable,l=o.displayWarning;return(0,b.jsx)(h,{children:(0,b.jsxs)(x,{isAvailable:r,tabIndex:"0",children:[(0,b.jsxs)(w,{children:[(0,b.jsx)(y,{children:n.name}),(0,b.jsx)(v,{children:n.startTime})]}),r?(0,b.jsx)(j,{onClick:function(){s(o),r&&(a&&l?i(!0):t(o))},"data-testid":"outpost-timeslot-cta-".concat(null==o?void 0:o.slot.name),children:"Order"}):(0,b.jsx)(j,{disabled:!0,children:(0,b.jsx)(u.Ay,{id:"outpost-timeslots.page.unavailable"})})]})})};var S=(0,g.default)("li",{target:"ejajy453"})({name:"1d3qz7b",styles:"margin-top:1.5rem;margin-bottom:1.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(231 228 228 / var(--tw-border-opacity, 1));"}),k=(0,g.default)("a",{target:"ejajy452"})({name:"1x9wt4b",styles:"display:grid;cursor:pointer;padding-top:1.5rem;padding-bottom:1.5rem;text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;:hover{--tw-bg-opacity:1;background-color:rgb(250 249 250 / var(--tw-bg-opacity, 1));}:focus{--tw-shadow:0 0 0 1px rgba(167, 145, 95, .5);
1--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);} grid-template-columns:16px auto"}),A=(0,g.default)("div",{target:"ejajy451"})({name:"qf9zlq",styles:"grid-column-start:2;grid-column-end:4;grid-row-start:2;grid-row-end:2;font-size:14px;line-height:20px;--tw-text-opacity:1;color:rgb(55 47 49 / var(--tw-text-opacity, 1));"}),N=(0,g.default)("ol",{target:"ejajy450"})({name:"q6n4wc",styles:"padding-left:1rem;padding-right:1rem;"});let C=function(e){var t=e.outpost,o=e.address,a=e.isActive,s=e.onClick,i=e.onTimeSlotSelected,n=e.cutoffTimeEnabled,r=e.setTimeslot,l=e.setCutoffModal,d=t.name;return(0,b.jsxs)(S,{children:[(0,b.jsxs)(k,{onClick:function(){return s(t)},onKeyDown:function(e){13===e.keyCode&&s(t)},"data-testid":"outpost-list-item-".concat(t.id),children:[(0,b.jsx)(c.Heading,{level:"h2",styleOverride:"headingXs",className:"row-start-1 row-end-1 col-start-2 col-end-4",children:d}),(0,b.jsx)(A,{children:o})]}),a&&(0,b.jsx)(N,{children:t.timeslots&&t.timeslots.map(function(e){return(0,b.jsx)(T,{onTimeSlotSelected:i,timeslot:e,isAvailable:e.isAvailable,cutoffTimeEnabled:n,setTimeslot:r,setCutoffModal:l},e.id)})})]})};var O=(0,g.default)("div",{target:"ejb87bf1"})("[role='dialog']{@media (max-width: ",(0,c.getScreenSizes)().md,"px){height:auto;width:66.666667%;;}@media (max-width: ",(0,c.getScreenSizes)().sm,"px){width:91.666667%;;}}"),_=(0,g.default)("div",{target:"ejb87bf0"})({name:"1wrfgah",styles:"margin-top:2rem;display:flex;flex-direction:column;justify-content:center;"});let z=function(e){var t=e.isOpen,o=e.closeModal;return(0,b.jsx)(O,{children:(0,b.jsxs)(c.Modal,{open:t,showCloseButton:!1,size:"narrow",children:[(0,b.jsx)(c.Heading,{level:"h2",styleOverride:"headingSm",className:"mb-5",children:(0,b.jsx)(u.Ay,{id:"outpost.page.modal.heading"})}),(0,b.jsx)(u.Ay,{id:"outpost.page.modal.content"}),(0,b.jsxs)(_,{children:[(0,b.jsx)(c.Button,{styleType:"quaternary",className:"mb-3",href:"/orderonline",children:(0,b.jsx)(u.Ay,{id:"outpost.page.modal.button.one"})}),(0,b.jsx)(c.Button,{styleType:"primary",onClick:o,children:(0,b.jsx)(u.Ay,{id:"outpost.page.modal.button.two"})})]})]})})};var M=(0,g.default)("div",{target:"e1sgg3wi4"})({name:"k008qs",styles:"display:flex;"}),E=(0,g.default)("div",{target:"e1sgg3wi3"})({name:"r3sryp",styles:"width:100%;@media (min-width: 1024px){width:50%;padding-right:2rem;}"}),q=(0,g.default)("div",{target:"e1sgg3wi2"})({name:"1q7n33y",styles:"display:none;width:50%;@media (min-width: 1024px){display:block;}"}),B=(0,g.default)("div",{target:"e1sgg3wi1"})({name:"1sf7ety",styles:"gap:0px; margin-left:0!important;margin-right:0!important"}),I=(0,g.default)("div",{target:"e1sgg3wi0"})("position:relative;z-index:0;display:flex;width:100%;flex:1 1 0%;flex-direction:column;overflow-y:auto;padding-left:0px;padding-right:0px; height:80vh;@media (max-width: ",(0,c.getScreenSizes)().md,"px){height:45vh;}"),P=o(70331);o(57728),o(79385);var R=o(14611);let D=function(e){var t=e.isOpen,o=e.closeModal,a=e.submitModal,s=e.slotName,i=e.slotTime,n=(0,r.useRouter)().locale,l=(0,u.Tl)("outpost.cutoff.modal.heading",n,{timeslot:s}).value,d=(0,u.Tl)("outpost.cutoff.modal.content",n,{closingTime:i}).value;return(0,b.jsx)(R.Bs,{children:(0,b.jsxs)(c.Modal,{open:t,showCloseButton:!0,onClose:o,size:"narrow",children:[(0,b.jsx)(R.On,{colour:"pretRed-700",size:"large"}),(0,b.jsxs)(R.$P,{children:[(0,b.jsx)(c.Heading,{level:"h2",styleOverride:"headingSm",className:"mb-5",children:l}),d]}),(0,b.jsx)(R.eM,{children:(0,b.jsx)(c.Button,{styleType:"primary",onClick:a,children:(0,b.jsx)(u.Ay,{id:"outpost.cutoff.modal.button"})})})]})})};var H=o(21499),F=o(46719),U=o(84962);o(31983);var X=!0;let G=function(e){var t,o,s,g,h,x=e.settings,w=e.outposts,y=e.showOfficeDropNotice,v=e.cutoffTimeEnabled,j=(0,r.useRouter)().locale,T=(0,P.w)(j),S="".concat(T,"/menu"),k=(0,f.N)(w.address),A=(0,n.useContext)(p.xy),N=A.updateFulfillmentDetails,O=A.updateOutpostTimeSlot,_=(0,H.G)(F.jZ),R=_.isAuthenticated,X=_.accessToken,G=_.isLoading,K=(0,n.use
1State)(!1),L=K[0],W=K[1],Y=(0,n.useState)(null),V=Y[0],Z=Y[1],$=(0,n.useState)(y),J=$[0],Q=$[1],ee=(0,n.useState)(!1),et=ee[0],eo=ee[1],ea=(0,n.useState)({}),es=ea[0],ei=ea[1],en=(0,n.useState)(!1),er=en[0],el=en[1];(0,n.useEffect)(function(){var e=!X||R;!G&&e&&el(!0)},[R,X,G]);var ed=(t=(0,a.A)(i().mark(function e(t){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(L){e.next=5;break}return W(!0),e.next=4,N({fulfillingChannelKey:t.associatedShopId,outpostId:t.id,orderType:"outpost"});case 4:W(!1);case 5:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)}),ec=(o=(0,a.A)(i().mark(function e(t){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return Z(t),e.next=3,ed(t);case 3:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)});(0,n.useEffect)(function(){1===w.outposts.length&&(Z(w.outposts[0]),er&&ed(w.outposts[0]))},[w,er]);var eu=(s=(0,a.A)(i().mark(function e(t){var o,a;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.actualStartTime,a=t.endTime,L){e.next=7;break}return W(!0),e.next=5,O({startTime:o,endTime:a});case 5:return e.next=7,l().push("/".concat(S),"/".concat(j,"/").concat(S));case 7:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)});return(0,b.jsxs)(M,{settings:x,children:[(0,b.jsx)(z,{isOpen:J,closeModal:function(){d.A.set("pret-office-drop-location-notice",!0),Q(!1)}}),(0,b.jsx)(D,{isOpen:et,closeModal:function(){return eo(!1)},submitModal:function(){return eu(es)},slotName:null==es||null==(g=es.slot)?void 0:g.name,slotTime:null==es||null==(h=es.slot)?void 0:h.orderBy}),(0,b.jsxs)(E,{className:"my-8",children:[(0,b.jsx)(c.Heading,{className:"mb-6",level:"h1",styleOverride:"headingSm",children:(0,b.jsx)(u.Ay,{id:"outpost.page.heading"})}),(0,b.jsx)("p",{className:"mb-4 text-lg",children:(0,b.jsx)(u.Ay,{id:"outpost.page.subheading"})}),(0,b.jsx)(m.A,{icon:(0,b.jsx)(U.u,{color:"text-warningYellow"}),colorVariant:"yellow",children:(0,b.jsx)(u.Ay,{id:"outpost.page.access-notification-banner"})}),(0,b.jsx)("p",{className:"pt-6 text-sm",children:(0,b.jsx)(u.Ay,{id:"outpost.page.your-outposts"})}),(0,b.jsx)(B,{children:(0,b.jsx)(I,{children:(0,b.jsx)("ol",{children:w.outposts.map(function(e,t){return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(C,{index:t+1,loading:!!(L&&V===e.id),isActive:(null==V?void 0:V.id)===e.id,onClick:ec,onTimeSlotSelected:eu,outpost:e,address:k,cutoffTimeEnabled:v,setTimeslot:ei,setCutoffModal:eo},"".concat(e.id,"-").concat(t))})})})})})]}),(0,b.jsx)(q,{children:(0,b.jsx)("img",{src:"https://images.ctfassets.net/4zu8gvmtwqss/26Nkk5hU89FIYkP1TwOzMt/56c1d7aa7958a4ac2bd333e10084abe2/outpost-trial-asset.svg",alt:"outpost"})})]})}}},e=>{e.O(0,[1379,4745,9306,636,6593,8792],()=>e(e.s=34185)),_N_E=e.O()}]);
2//# sourceMappingURL=[outpostLocationId]-cafa65e0e5cde440.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.