PageSourceSearch

https://www.laterooms.com/_next/static/chunks/pages/favourites/[uuid]-913b7cca8d4633a9.js

js laterooms.com collected 2026-09-24 17:57:49 UTC 9,502 bytes, 53 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8146],{36070:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/favourites/[uuid]",function(){return i(634)}])},46475:function(e,t,i){"use strict";var r=i(85893),s=i(37871),n=i(50661),o=i(693),a=i(38588),c=i(29379),l=i(59618),p=i(49092);let d=n.default.li.withConfig({componentId:"sc-2b42cf01-0"})(["box-sizing:border-box;margin:0;cursor:pointer;position:relative;img{height:16rem;width:100%;object-fit:cover;}.bottom{padding:0.625rem 1rem;h4{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}p,span{margin:0;}p{font-size:0.75rem;padding-bottom:0.5rem;}.dates{color:",";span{font-size:0.8rem;}}}.price{margin-top:0.35rem;span{font-size:0.8rem;}}@media (min-width:","){img{height:12rem;}}"],({theme:e})=>e.colors.primary,p.Z.desktop),m=n.default.div.withConfig({componentId:"sc-2b42cf01-1"})(["padding:0.1rem;background-color:",";border-radius:50%;height:2rem;width:2rem;position:absolute;top:0.5rem;left:0.5rem;display:flex;justify-content:center;align-items:center;cursor:pointer;svg{width:1rem;height:1rem;fill:black;}"],({theme:e})=>e.colors.white),u=(e,t="en-GB")=>new Date(e).toLocaleDateString(t,{day:"numeric",month:"short"}),h=(e,t)=>Math.abs((new Date(t)-new Date(e))/864e5);t.Z=({property:e,list:t,prices:i,handleUpdate:n,noDelete:p,locale:g="en-GB"})=>{let{t:f}=(0,s.$G)("pages/account"),{currencyCode:x}=(0,c.b)();if(!e)return null;let y=JSON.stringify(t.party,(e,t)=>"__typename"===e?void 0:t),b=(e,t,i)=>{e.preventDefault(),n({variables:{uuid:t,removePropertyIds:[i]}})},k=`/hotel/${e?.urlRegion}/${e?.slug}`,v=t.checkInDate&&t.checkoutDate?`${k}?checkin=${t.checkInDate}&checkout=${t.checkoutDate}&nights=${h(t.checkInDate,t.checkoutDate)}&rooms=${y}`:k,D=i?.filter(t=>t.property?.id===e?.id);return(0,r.jsx)("a",{href:v,target:"_blank",rel:"noreferrer",children:(0,r.jsxs)(d,{children:[e?.images?.[0]?.small&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:e.images[0].small,alt:e.images[0].caption||e.name,loading:"lazy"}),!p&&(0,r.jsx)(m,{onClick:i=>b(i,t.uuid,e?.id),children:(0,r.jsx)(o.Z,{name:"icon-bin"})})]}),(0,r.jsxs)("div",{className:"bottom",children:[(0,r.jsx)("h4",{children:e?.name}),e?.address&&(0,r.jsxs)("p",{children:[e.address.line1,", ",e.address.city]}),e?.rating?.guestCount&&e?.rating?.guestRating&&(0,r.jsx)(a.Z,{rating:e.rating.guestRating,reviews:e.rating.guestCount}),(0,r.jsxs)("div",{className:"dates",children:[t?.checkInDate&&(0,r.jsx)("span",{children:u(t.checkInDate,g)}),t?.checkoutDate&&(0,r.jsxs)("span",{children:[" - ",u(t.checkoutDate,g)]})]}),D&&D.length>0?D.map((i,s)=>{let n=Math.round(parseFloat(i.total||0));return(0,r.jsx)("div",{className:"price",children:i.total?(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:(0,l.x)(n,x)}),(0,r.jsxs)("span",{children:[" ",f("favourites.for")," ",h(t.checkInDate,t.checkoutDate)," ",h(t.checkInDate,t.checkoutDate)>1?f("favourites.nights"):f("favourites.night")]})]}):(0,r.jsx)("span",{children:f("favourites.change_dates")})},`${e?.id}-${s}`)}):(0,r.jsx)("div",{className:"price",children:(0,r.jsx)("span",{children:f("favourites.change_dates")})})]})]})})}},38588:function(e,t,i){"use strict";var r=i(85893),s=i(37871),n=i(50661),o=i(70322);let a=n.default.div.withConfig({componentId:"sc-79617c9e-0"})(["display:flex;flex-direction:row;align-items:center;color:",";margin-top:0.35rem;p{margin:0;font-size:",";white-space:nowrap;color:",";b{border:none;background:",";color:",";border-radius:4px;padding:0.2rem 0.65rem;box-sizing:border-box;}}"],e=>e.theme.colors.black,e=>e.isMapMarker?"0.65rem":".75rem",e=>e.theme.colors.sharkGrey,e=>e.theme.colors.primary,e=>e.theme.colors.white);t.Z=({rating:e,comp:t,reviews:i,isMapMarker:n,translations:c,locale:l})=>{let{t:p,i18n:d}=(0,s.$G)("common"),m=c&&Object.keys(c).length>0,u=m?(0,o.i)(c,"components/cards.review","review"):p("components/cards:review"),h=m?l||"en":d.language;return(0,r.jsxs)(a,{className:"reviews"===t?u:"",isMapMarker:n,children:[(0,r.jsx)("p",{children:(0,r.jsxs)("b",{children:[e,e%1==0&&".0"]})}),"\xa0",i>
10&&(0,r.jsxs)("p",{children:[i.toLocaleString()," ",u,i>1&&"en"===h&&"s"]})]})}},59618:function(e,t,i){"use strict";i.d(t,{W:function(){return r},x:function(){return s}});let r={AED:{pos:"prefix",space:!0,symbol:"AED"},AUD:{pos:"prefix",space:!0,symbol:"AUD"},BRL:{pos:"prefix",space:!1,symbol:"R$"},CAD:{pos:"prefix",space:!0,symbol:"CAD"},CHF:{pos:"prefix",space:!0,symbol:"CHF"},CNY:{pos:"prefix",space:!1,symbol:"\xa5"},DKK:{pos:"suffix",space:!0,symbol:"kr"},EUR:{pos:"prefix",space:!1,symbol:"€"},GBP:{pos:"prefix",space:!1,symbol:"\xa3"},HKD:{pos:"prefix",space:!0,symbol:"HKD"},IDR:{pos:"prefix",space:!1,symbol:"Rp",dp:0},INR:{pos:"prefix",space:!1,symbol:"₹"},JPY:{pos:"prefix",space:!1,symbol:"\xa5",dp:0},KRW:{pos:"prefix",space:!1,symbol:"₩",dp:0},NZD:{pos:"prefix",space:!0,symbol:"NZD"},PLN:{pos:"suffix",space:!0,symbol:"zł"},SGD:{pos:"prefix",space:!0,symbol:"SGD"},THB:{pos:"prefix",space:!1,symbol:"฿"},TRY:{pos:"prefix",space:!1,symbol:"₺"},USD:{pos:"prefix",space:!1,symbol:"$"}},s=(e,t,i={})=>{let s,n;let o=t||"GBP",a=r[o]||{pos:"prefix",space:!0,symbol:o},c="number"==typeof e?e:parseFloat(String(e)),l=Number.isFinite(c);if(Number.isInteger(a.dp))s=n=a.dp;else if(null!=i.minimumFractionDigits||null!=i.maximumFractionDigits){let e=i.minimumFractionDigits??0,t=i.maximumFractionDigits??e;n=Math.max(s=Math.max(0,Math.min(20,e)),Math.min(20,t))}else s=n=0;let p=l?c.toLocaleString("en-US",{minimumFractionDigits:s,maximumFractionDigits:n}):e;return"prefix"===a.pos?`${a.symbol}${a.space?" ":""}${p}`:`${p}${a.space?" ":""}${a.symbol}`}},634:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSG:function(){return C}});var r=i(85893),s=i(67294),n=i(11163),o=i(37871),a=i(68806),c=i(2448),l=i(50661),p=i(37251),d=i(13223),m=i(46475),u=i(25461),h=i(73754),g=i(80462),f=i(49092);let x=l.default.div.withConfig({componentId:"sc-dc09c436-0"})(["margin:4rem 0;"]),y=l.default.div.withConfig({componentId:"sc-dc09c436-1"})(["display:flex;align-items:center;flex-direction:column;@media (min-width:","){flex-direction:row;}"],f.Z.desktop),b=l.default.div.withConfig({componentId:"sc-dc09c436-2"})(["margin-top:2.25rem;"]),k=l.default.ul.withConfig({componentId:"sc-dc09c436-3"})(["list-style:none;padding:0;margin:1rem 0 0;display:grid;gap:1rem;grid-template-columns:100%;@media (min-width:","){grid-template-columns:repeat(4,minmax(0,1fr));}a{text-decoration:none;color:",";}"],f.Z.desktop,e=>e.theme.colors.black),v=l.default.div.withConfig({componentId:"sc-dc09c436-4"})(['width:12.5rem;height:12.5rem;position:relative;background-size:contain;background-repeat:no-repeat;margin:0 0 2rem 0;background-image:url("/images/facepalm.png");@media (min-width:',"){margin:0 2rem 0 0;}"],f.Z.desktop),D=(e,t)=>Math.abs((new Date(t)-new Date(e))/864e5),w=e=>{let t=e.replace(/<[^>]*>/g,"").trim();return t.length>50?t.slice(0,50)+"...":t},j=(0,a.Ps)`
2  query ($uuid: String!, $token: String!) {
3    favouritesList(params: { uuid: $uuid, token: $token }) {
4      uuid
5      name
6      propertyIds
7      sharingUrl
8      party {
9        adults
10        children
11      }
12      checkInDate
13      checkoutDate
14    }
15  }
16`,$=(0,a.Ps)`
17  query ($ids: [Int!]!) {
18    getProperty: properties(ids: $ids) {
19      id
20      name
21      slug
22      urlRegion
23      address {
24        line1
25        line2
26        city
27        state
28        postCode
29        countryCode
30      }
31      images {
32        caption
33        small
34      }
35      rating {
36        guestCount
37        guestRating
38      }
39    }
40  }
41`,I=(0,a.Ps)`
42  query ($propertyIds: [Int!]!, $checkin: Date!, $nights: Int!, $party: [PartyConfig!]!) {
43    prices(
44      params: { propertyIds: $propertyIds, checkin: $checkin, nights: $nights, party: $party }
45    ) {
46      total
47      memberTotal
48      property {
49        id
50      }
51    }
52  }
53`;var C=!0;t.default=({uuid:e})=>{let{t}=(0,o.$G)("pages/account"),i=(0,n.useRouter)(),[a,l]=(0,s.useState)(null),[f,C]=(0,s.useState)(!1),[_,N]=(0,s.useState)([]),[S,P]=(0,s.useState)([]),[R,Z]=(0,s.use
53State)([]),[E]=(0,c.t)(j,{onError:()=>C(!0),onCompleted:e=>{l(e.favouritesList),P(e.favouritesList.propertyIds)}}),[F]=(0,c.t)($,{fetchPolicy:"network-only",onError:()=>C(!0),onCompleted:e=>N(e.getProperty)}),[G]=(0,c.t)(I,{fetchPolicy:"network-only",onCompleted:e=>Z(e.prices)});(0,s.useEffect)(()=>{e&&E({variables:{uuid:e,token:new URL(window.location.href).searchParams.get("token")}})},[e]),(0,s.useEffect)(()=>{0!==S.length&&a&&(F({variables:{ids:S}}),G({variables:{propertyIds:S,nights:D(a.checkInDate,a.checkoutDate),checkin:a.checkInDate,party:a.party}}))},[S,a]);let M=a?w(a.name||t("favourites.my_next_trip")):"",L=a?`${M} (${a.propertyIds.length})`:"";return(0,r.jsx)(g.Z,{page:"favourites",seo:{title:`${t("favourites.title")} - ${h.UQ.name}`,description:t("favourites.plan")},children:(0,r.jsx)(d.Z,{children:(0,r.jsx)(u.Z,{children:(0,r.jsx)(p.Z,{lg:10,lgOffset:1,children:(0,r.jsxs)(x,{children:[a&&(0,r.jsxs)(b,{children:[(0,r.jsx)("h1",{children:L}),(0,r.jsx)(k,{children:_.map(e=>(0,r.jsx)(m.Z,{noDelete:!0,list:a,locale:i.locale,prices:R,property:e},e.id))})]}),f&&(0,r.jsxs)(y,{children:[(0,r.jsx)(v,{}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{children:t("favourites.list_not_found","List not found")}),(0,r.jsx)("p",{children:t("favourites.try_again","Please try again or request a new link.")})]})]})]})})})})})}}},function(e){e.O(0,[8701,2448,462,2888,9774,179],function(){return e(e.s=36070)}),_N_E=e.O()}]);

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.