@roomstay/frontend 2.3.0-1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/201.bundle.js +1 -1
  2. package/dist/213.bundle.js +1 -1
  3. package/dist/370.bundle.js +1 -1
  4. package/dist/446.bundle.js +1 -1
  5. package/dist/449.bundle.js +1 -1
  6. package/dist/572.bundle.js +1 -1
  7. package/dist/903.bundle.js +1 -1
  8. package/dist/975.bundle.js +1 -1
  9. package/dist/main.bundle.js +1 -1
  10. package/dist/src/components/generic/ScrollToTop.js +5 -1
  11. package/dist/src/components/generic/ScrollToTop.js.map +1 -1
  12. package/dist/src/components/generic/Select/Select.d.ts +3 -1
  13. package/dist/src/components/generic/Select/Select.js +6 -2
  14. package/dist/src/components/generic/Select/Select.js.map +1 -1
  15. package/dist/src/components/generic/Tabs/Tab.d.ts +1 -0
  16. package/dist/src/components/generic/Tabs/Tab.js.map +1 -1
  17. package/dist/src/components/generic/Tabs/TabLink.js +2 -2
  18. package/dist/src/components/generic/Tabs/TabLink.js.map +1 -1
  19. package/dist/src/components/generic/Tooltip/Tooltip.js +4 -1
  20. package/dist/src/components/generic/Tooltip/Tooltip.js.map +1 -1
  21. package/dist/src/components/steps/confirmation/StepConfirmationForm.js +3 -3
  22. package/dist/src/components/steps/confirmation/StepConfirmationForm.js.map +1 -1
  23. package/dist/src/components/steps/hotel/HotelCard.js +2 -2
  24. package/dist/src/components/steps/hotel/HotelCard.js.map +1 -1
  25. package/dist/src/components/steps/room/InactivityWindow.js +9 -11
  26. package/dist/src/components/steps/room/InactivityWindow.js.map +1 -1
  27. package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRoomList.js +1 -1
  28. package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRoomList.js.map +1 -1
  29. package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRooms.js +2 -2
  30. package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRooms.js.map +1 -1
  31. package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummaryPromocodeInput.d.ts +4 -1
  32. package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummaryPromocodeInput.js +6 -4
  33. package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummaryPromocodeInput.js.map +1 -1
  34. package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummaryRow.js +20 -18
  35. package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummaryRow.js.map +1 -1
  36. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfAdultsPicker.d.ts +2 -0
  37. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfAdultsPicker.js +1 -1
  38. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfAdultsPicker.js.map +1 -1
  39. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfChildrenPicker.d.ts +2 -0
  40. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfChildrenPicker.js +1 -1
  41. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfChildrenPicker.js.map +1 -1
  42. package/dist/src/components/steps/room/roomDetails/RoomDetails.js +2 -1
  43. package/dist/src/components/steps/room/roomDetails/RoomDetails.js.map +1 -1
  44. package/dist/src/components/steps/room/roomDetails/RoomDetailsPriceBlock.d.ts +1 -0
  45. package/dist/src/components/steps/room/roomDetails/RoomDetailsPriceBlock.js +2 -2
  46. package/dist/src/components/steps/room/roomDetails/RoomDetailsPriceBlock.js.map +1 -1
  47. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateRow.js +11 -8
  48. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateRow.js.map +1 -1
  49. package/dist/src/components/summary/BEMobileSummaryModal.js +73 -60
  50. package/dist/src/components/summary/BEMobileSummaryModal.js.map +1 -1
  51. package/dist/src/components/summary/BESummaryRoomRow.js +32 -26
  52. package/dist/src/components/summary/BESummaryRoomRow.js.map +1 -1
  53. package/dist/src/contexts/BasketContext/BasketContextWrapper.js +41 -19
  54. package/dist/src/contexts/BasketContext/BasketContextWrapper.js.map +1 -1
  55. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.js +16 -17
  56. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.js.map +1 -1
  57. package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngineElement.js +3 -3
  58. package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngineElement.js.map +1 -1
  59. package/dist/src/hooks/CurrentHotelHook.d.ts +2 -0
  60. package/dist/src/hooks/CurrentHotelHook.js +19 -3
  61. package/dist/src/hooks/CurrentHotelHook.js.map +1 -1
  62. package/dist/src/hooks/HistoryConsistentPush.d.ts +1 -1
  63. package/dist/src/hooks/HistoryConsistentPush.js +6 -2
  64. package/dist/src/hooks/HistoryConsistentPush.js.map +1 -1
  65. package/dist/src/pages/hotel/HotelInfo.js +4 -4
  66. package/dist/src/pages/hotel/HotelInfo.js.map +1 -1
  67. package/dist/src/pages/steps/Step.d.ts +1 -1
  68. package/dist/src/pages/steps/Step.js.map +1 -1
  69. package/dist/src/routes/NaturallyProgressedStepRoute.js +2 -2
  70. package/dist/src/routes/NaturallyProgressedStepRoute.js.map +1 -1
  71. package/dist/src/stories/BookingWizard.stories.js +2 -2
  72. package/dist/src/stories/BookingWizard.stories.js.map +1 -1
  73. package/dist/src/translations/Translation.d.ts +4 -0
  74. package/dist/src/translations/Translation.js +4 -0
  75. package/dist/src/translations/Translation.js.map +1 -1
  76. package/dist/src/translations/languages/en-gb.js +4 -0
  77. package/dist/src/translations/languages/en-gb.js.map +1 -1
  78. package/dist/src/util/Color.js +3 -0
  79. package/dist/src/util/Color.js.map +1 -1
  80. package/dist/src/util/GetStepRoom.d.ts +3 -0
  81. package/dist/src/util/GetStepRoom.js +11 -0
  82. package/dist/src/util/GetStepRoom.js.map +1 -0
  83. package/dist/test.bundle.js +1 -1
  84. package/dist/tests/offline/entry/{RSCompany.js → OfflineEngineDefaults.js} +6 -52
  85. package/dist/tests/offline/entry/OfflineEngineDefaults.js.map +1 -0
  86. package/dist/tests/offline/entry/OfflineEngineWrapper.d.ts +1 -0
  87. package/dist/tests/offline/entry/{ReactWrapper.js → OfflineEngineWrapper.js} +14 -21
  88. package/dist/tests/offline/entry/OfflineEngineWrapper.js.map +1 -0
  89. package/dist/tests/offline/entry/components/TestPicker.js +61 -2
  90. package/dist/tests/offline/entry/components/TestPicker.js.map +1 -1
  91. package/dist/tests/offline/entry/engineRenderer/memberPortalWidgetRenderer.js +2 -2
  92. package/dist/tests/offline/entry/engineRenderer/memberPortalWidgetRenderer.js.map +1 -1
  93. package/dist/tests/offline/entry/{allEngines.js → offline-entry.js} +3 -3
  94. package/dist/tests/offline/entry/offline-entry.js.map +1 -0
  95. package/dist/tests/offline/entry/pages/Inline/index.d.ts +4 -0
  96. package/dist/tests/offline/entry/pages/Inline/index.js +96 -0
  97. package/dist/tests/offline/entry/pages/Inline/index.js.map +1 -0
  98. package/package.json +1 -1
  99. package/dist/tests/offline/entry/RSCompany.js.map +0 -1
  100. package/dist/tests/offline/entry/ReactWrapper.d.ts +0 -1
  101. package/dist/tests/offline/entry/ReactWrapper.js.map +0 -1
  102. package/dist/tests/offline/entry/allEngines.js.map +0 -1
  103. /package/dist/tests/offline/entry/{RSCompany.d.ts → OfflineEngineDefaults.d.ts} +0 -0
  104. /package/dist/tests/offline/entry/{allEngines.d.ts → offline-entry.d.ts} +0 -0
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[201],{6712:function(e,t,l){l.d(t,{e:function(){return m}});var a=l(5671),n=l(3144),i=l(136),r=l(2963),c=l(1120);var m=function(e){(0,i.Z)(u,e);var t,l,m=(t=u,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=(0,c.Z)(t);if(l){var n=(0,c.Z)(this).constructor;e=Reflect.construct(a,arguments,n)}else e=a.apply(this,arguments);return(0,r.Z)(this,e)});function u(e){var t;return(0,a.Z)(this,u),(t=m.call(this)).basketRows=void 0,t.basketRows=e,t}return(0,n.Z)(u,null,[{key:"getLabel",value:function(){return"View/Addon"}}]),u}(l(7112).x)},2201:function(e,t,l){l.r(t),l.d(t,{default:function(){return F}});var a=l(7294),n=l(3727),i=l(6793),r=l(3821),c=l(3010),m=l(9874),u=l(885),o=l(4516),d=l(360),s=l(7688),C=l(7832),f=l(1972),E=l(9366),g=l(9478),h=l(7754),L=l(4854),v=l(858),p=l(6380),Z=l(584),y=l(4184),N=l.n(y),b=function(e){return a.createElement("div",{className:e.className},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("rect",{width:"24",height:"24",rx:"12",fill:h.Il.Accent}),a.createElement("path",{d:"M7.33333 12L10.6667 15.3333L16.6667 9.33332L15.7267 8.38666L10.6667 13.4467L8.27333 11.06L7.33333 12Z",fill:"white"})))},P=l(3351),A=l(4744),x=function(e){var t,l,n=e.addon,r=e.className,m=(0,i.$)().t,o=(0,s.WP)().hotel,C=a.useContext(d.hy),f=C.getRowForAddon(n),y=(0,a.useState)(1),x=(0,u.Z)(y,2),w=x[0],M=x[1],D=(0,a.useState)(f?f.getAdultQuantity():1),S=(0,u.Z)(D,2),R=S[0],k=S[1],_=(0,a.useState)(f?f.getChildQuantity():0),I=(0,u.Z)(_,2),T=I[0],F=I[1],O=(0,a.useState)({quantity:1}),W=(0,u.Z)(O,2),G=W[0],H=W[1],V=(0,a.useState)(f?f.getSelectedDate():""),z=(0,u.Z)(V,2),Q=z[0],U=z[1],q=(0,a.useState)(f?f.getSelectedTime():""),Y=(0,u.Z)(q,2),B=Y[0],j=Y[1];(0,a.useEffect)((function(){var e,t,l,a,i,r,c;f?(H(null!==(e=n.availability[f.getSelectedDate()])&&void 0!==e?e:n.availability[n.firstDate]),U(null!==(t=f.getSelectedDate())&&void 0!==t?t:n.firstDate),j(null!==(l=f.getSelectedTime())&&void 0!==l?l:""),M(f.getQuantity()),k(f.getAdultQuantity()),F(f.getChildQuantity())):(H(null!==(a=n.availability[n.firstDate])&&void 0!==a?a:[]),U(n.firstDate),j((null===(i=n.availability[n.firstDate])||void 0===i||null===(r=i.selectorTimes)||void 0===r||null===(c=r[0])||void 0===c?void 0:c.value)||""))}),[]);var $=N()({"--active":!!C.getRowForAddon(n)}),J=[{name:"Date",enabled:(null==f||null===(t=f.getNumberOfAvailableNights)||void 0===t?void 0:t.call(f))>1&&!(null!=f&&f.getAddon().hideDatePicker),element:a.createElement(P.P,{nativeOnMobile:!0,options:n.selectorDates,value:Q,onChange:function(e){var t,l,a,i;t=e,H(n.availability[t]),U(t),j((null===(l=n.availability[t])||void 0===l||null===(a=l.selectorTimes)||void 0===a||null===(i=a[0])||void 0===i?void 0:i.value)||""),n.availability[t].quantity<w&&M(n.availability[t].quantity)},keyName:"value",labelName:"text",className:"u-flex align-items-center"})},{name:"Time",enabled:0!==(null==G||null===(l=G.selectorTimes)||void 0===l?void 0:l.length),element:a.createElement(P.P,{nativeOnMobile:!0,options:(null==G?void 0:G.selectorTimes)||[],value:B,onChange:function(e){j(e)},keyName:"value",labelName:"text",className:"u-flex align-items-center"})},{name:g.W.Step.Addon.Quantity,enabled:null==G?void 0:G.price,element:a.createElement(p.Z,{number:w,min:1,max:G.quantity,onChange:function(e){M(e)}})},{name:g.W.Step.Date.Adult_plural,enabled:null==G?void 0:G.adultPrice,element:a.createElement(p.Z,{number:R,min:0,max:G.quantity-T,onChange:function(e){k(e)}})},{name:g.W.Step.Date.Child_plural,enabled:null==G?void 0:G.childPrice,element:a.createElement(p.Z,{number:T,min:0,max:G.quantity-R,onChange:function(e){F(e)}})}],K=function(){switch(n.pricingType){case E.VO.PER_STAY:return m(g.W.Misc.QTY);case E.VO.PER_PERSON:return m(g.W.Misc.Person);case E.VO.PER_PERSON_OCCUPANCY_PER_NIGHT:case E.VO.PER_PERSON_PER_NIGHT:return m(g.W.Misc.PersonPerNight);case E.VO.PER_ADULT_OCCUPANCY_PER_NIGHT:case E.VO.PER_CHILD_OCCUPANCY_PER_NIGHT:return m(g.W.Misc.AdultPerNight);case E.VO.PER_NIGHT:case E.VO.PER_QUANTITY_NAME_PER_NIGHT:return m(g.W.Misc.Night);case E.VO.PER_ROOM_QUANTITY_PER_NIGHT:return m(g.W.Misc.PerRoomDay)}}(),X={};return n.image?X.backgroundImage="url('".concat(A.Z.resizeImage(n.image,A.h.Original),"')"):(X.backgroundImage="url('".concat((null==o?void 0:o.logo)&&A.Z.resizeImage(null==o?void 0:o.logo,A.h.Original),"')"),X.backgroundSize="50%",X.backgroundRepeat="no-repeat"),a.createElement("div",{className:N()("u-flex u-flex-flex-start u-rounded addon-card-wrapper",r,$),style:{backgroundColor:h.Il.White}},a.createElement("div",{className:"addon-card-image",style:X}),a.createElement("div",{className:"u-marg-heavy u-marg@m- u-w-100@xl"},a.createElement("div",{className:"u-flex"},a.createElement(c.Z,{bold:!0},n.name),f?a.createElement(b,null):a.createElement(a.Fragment,null)),a.createElement(Z.ZP,{color:h.Il.DarkGrey,type:Z.yG.Small},n.description),a.createElement("div",{className:"addon-card-wrapper--price u-flex u-flex-align-flex-end"},a.createElement("div",{className:"u-w-100"},J.map((function(e){if(e.enabled)return a.createElement("div",{key:e.name,className:"u-flex justify-content-start u-marg-bot u-marg-top"},a.createElement(Z.ZP,{className:"u-mw-100",bold:!0},m(e.name)),e.element)}))),a.createElement("div",{className:"addon-card-wrapper--price-action"},a.createElement("div",{className:"u-flex u-flex-direction-column u-flex-align-flex-end",style:{alignSelf:"flex-end"}},a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.Navy,inline:!0},m(g.W.Misc.From)),a.createElement("div",{className:"room-details--content-price flex-align-items-baseline flex-row"},(null==G?void 0:G.price)&&a.createElement(a.Fragment,null,a.createElement("div",{className:"u-flex align-items-end"},a.createElement(c.Z,{size:"large",bold:!0,lineHeight:"1em"},a.createElement(v.Z,{hideDecimals:!0},G.price)),a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",K))),(!(null==G||!G.adultPrice)||!(null==G||!G.childPrice))&&a.createElement("h2",{className:"u-marg-none d-flex flex-wrap justify-content-end"},!!G.adultPrice&&a.createElement("div",{className:"d-flex align-items-end flex-row"},a.createElement(c.Z,{size:"large",bold:!0,lineHeight:"1em"},a.createElement(v.Z,null,G.adultPrice)),a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",m(g.W.Step.Date.Adult))),!!G.adultPrice&&!!G.childPrice&&a.createElement("br",null),!!G.childPrice&&a.createElement("div",{className:"d-flex align-items-end flex-row"},a.createElement(c.Z,{size:"large",bold:!0,lineHeight:"1em"},a.createElement(v.Z,null,G.childPrice)),a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",m(g.W.Step.Date.Child))))),a.createElement("div",{className:"u-marg-bottom--light"},a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.Grey,inline:!0,className:"u-nowrap"},m(g.W.Step.Addon.IncludingFeesAndTaxes)))),a.createElement("div",{className:"u-marg-top--light u-flex justify-content-end u-w-100@l- flex-column flex-lg-row"},f?a.createElement("div",{className:"u-marg-right--light@l u-marg-bottom--light@l-"},a.createElement(L.Z,{onClick:function(){var e=C.basketAddonRows.find((function(e){return e.getAddon().code===n.code}));e&&C.removeBasketAddonRow(e)},textColor:h.Il.White,backgroundColor:h.Il.Navy,wide:!0},m(g.W.Step.Addon.Remove))):a.createElement(a.Fragment,null),a.createElement(L.Z,{onClick:function(){C.setAddonQuantities(n,{quantity:w,adult:R,child:T},Q,B)},primary:!0,filled:!0,wide:!0},m(f?g.W.Step.Addon.UpdateCart:g.W.Step.Addon.AddToCart)))))))};function w(){var e=(0,i.$)().t;return a.createElement("div",{className:"u-align-center"},a.createElement("div",{className:"u-marg-bottom--heavy"},a.createElement("svg",{width:"310",height:"225",viewBox:"0 0 410 325",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("g",{clipPath:"url(#clip0)"},a.createElement("path",{d:"M363.971 303.844L404.823 243.18L364.054 310.371L364.14 317.197C361.157 317.22 358.204 317.17 355.279 317.048L357.306 229.301L357.25 228.624L357.325 228.493L357.519 220.202L312.78 155.341L357.466 213.996L357.625 215.749L359.155 149.452L320.513 82.206L359.265 137.806L358.861 0.457132L358.861 0L358.875 0.449586L361.44 108.699L396.657 64.728L361.555 118.024L362.324 177.325L394.731 119.45L362.443 186.043L362.871 219.017L410 138.398L363.014 230.52L363.971 303.844Z",fill:"#F0F0F5"}),a.createElement("path",{d:"M207.709 324.999C303.358 324.999 380.897 321.054 380.897 316.187C380.897 311.32 303.358 307.375 207.709 307.375C112.059 307.375 34.52 311.32 34.52 316.187C34.52 321.054 112.059 324.999 207.709 324.999Z",fill:"#F0F0F5"}),a.createElement("path",{d:"M308.903 322.349C311.798 322.349 314.145 320.005 314.145 317.114C314.145 314.223 311.798 311.879 308.903 311.879C306.007 311.879 303.66 314.223 303.66 317.114C303.66 320.005 306.007 322.349 308.903 322.349Z",fill:"#1D283D"}),a.createElement("path",{d:"M309.617 208.373L295.796 171.729C295.796 171.729 297.94 164.829 292.221 165.305C286.502 165.781 271.252 171.016 271.252 171.016C271.252 171.016 266.009 171.491 273.158 178.868L285.549 217.653L289.6 215.75L276.256 177.202C276.256 177.202 275.541 174.585 278.162 173.871C280.784 173.157 290.792 168.874 291.745 171.491C292.698 174.109 305.089 211.705 305.089 211.705L309.617 208.373Z",fill:"#1D283D"}),a.createElement("path",{className:"c-image-blank-slate",d:"M272.443 233.592L299.132 313.305C301.291 314.734 303.634 315.865 306.097 316.667C308.324 317.431 310.62 317.979 312.953 318.301C313.822 318.37 314.696 318.301 315.543 318.097C329.266 315.36 376.338 290.224 376.338 290.224C376.338 290.224 352.271 215.27 348.22 206.228C344.169 197.186 335.114 200.518 335.114 200.518C335.114 200.518 289.374 212.85 282.809 215.142C282.673 215.189 282.554 215.232 282.452 215.27C279.56 216.312 277.064 218.223 275.305 220.741L275.303 220.743C268.631 224.788 272.443 233.592 272.443 233.592Z",fill:"#FF8200"}),a.createElement("path",{opacity:"0.2",d:"M291.602 212.257L291.73 212.715C293.796 212.137 295.556 216.738 295.573 216.784L324.882 297.921L325.33 297.76L321.614 287.472L361.532 269.866L364.676 278.883L365.126 278.727L338.905 203.51L338.89 203.487C338.797 203.34 336.587 199.89 333.964 200.584L334.086 201.045C336.277 200.462 338.286 203.434 338.473 203.719L344.023 219.639L302.059 233.337L296.02 216.62C295.942 216.41 294.088 211.561 291.602 212.257ZM344.18 220.089L348.268 231.816L306.956 246.893L302.221 233.785L344.18 220.089ZM311.833 260.396L307.117 247.34L348.425 232.266L352.484 243.909L311.833 260.396ZM352.64 244.359L357.09 257.123L316.509 273.339L311.995 260.844L352.64 244.359ZM321.452 287.023L316.671 273.787L357.247 257.573L361.375 269.415L321.452 287.023Z",fill:"black"}),a.createElement("path",{opacity:"0.15",d:"M275.303 230.74C277.686 234.547 304.375 314.259 304.375 314.259C304.869 315.117 305.446 315.924 306.098 316.67C308.325 317.434 310.621 317.981 312.953 318.304C313.822 318.372 314.696 318.303 315.543 318.1C313.904 317.509 310.241 315.599 308.426 309.976C306.043 302.6 279.831 224.791 279.831 224.791C279.831 224.791 280.65 218.923 282.809 215.145C282.674 215.192 282.554 215.235 282.452 215.273C279.561 216.315 277.064 218.226 275.306 220.743L275.303 220.746C275.303 220.746 272.92 226.932 275.303 230.74Z",fill:"black"}),a.createElement("path",{d:"M280.069 248.348L282.69 256.438C282.69 256.438 280.546 272.38 291.745 282.85L294.128 290.94L291.666 291.007L289.065 283.24C289.065 283.24 280.427 272.834 280.367 257.26L278.163 248.348H280.069Z",fill:"#1D283D"}),a.createElement("path",{d:"M324.987 322.466C327.882 322.466 330.229 320.122 330.229 317.231C330.229 314.34 327.882 311.996 324.987 311.996C322.091 311.996 319.744 314.34 319.744 317.231C319.744 320.122 322.091 322.466 324.987 322.466Z",fill:"#1D283D"}),a.createElement("path",{d:"M375.862 300.458C378.757 300.458 381.104 298.114 381.104 295.223C381.104 292.332 378.757 289.988 375.862 289.988C372.966 289.988 370.619 292.332 370.619 295.223C370.619 298.114 372.966 300.458 375.862 300.458Z",fill:"#1D283D"}),a.createElement("path",{d:"M187.577 72.4766C187.577 72.4766 175.443 74.6796 174.891 79.6365C174.576 83.1175 174.576 86.6199 174.891 90.1009L187.577 72.4766Z",fill:"#575A89"}),a.createElement("path",{d:"M257.073 188.137C257.073 188.137 221.774 200.805 198.608 189.79C175.443 178.774 147.314 165.005 147.314 165.005C147.314 165.005 133.525 166.107 135.179 157.846C136.834 149.584 147.865 101.668 173.237 85.6959C173.237 85.6959 188.68 65.8685 197.505 66.97C206.33 68.0716 240.527 149.584 240.527 149.584L257.073 188.137Z",fill:"#575A89"}),a.createElement("path",{opacity:"0.2",d:"M257.073 188.137C257.073 188.137 221.774 200.805 198.608 189.79C175.443 178.774 147.314 165.005 147.314 165.005C147.314 165.005 133.525 166.107 135.179 157.846C136.834 149.584 147.865 101.668 173.237 85.6959C173.237 85.6959 188.68 65.8685 197.505 66.97C206.33 68.0716 240.527 149.584 240.527 149.584L257.073 188.137Z",fill:"black"}),a.createElement("path",{d:"M275.826 158.395L278.032 163.902C278.032 163.902 292.373 172.714 286.306 178.773C280.238 184.831 271.106 168.584 271.106 168.584L267.553 161.699L275.826 158.395Z",fill:"#A0616A"}),a.createElement("path",{d:"M155.035 256.98L152.829 294.983L164.412 299.94L168.824 254.227L155.035 256.98Z",fill:"#A0616A"}),a.createElement("path",{d:"M201.917 256.98L217.361 276.808L221.773 290.026L232.805 289.475L235.562 276.257L220.119 260.836L201.917 256.98Z",fill:"#A0616A"}),a.createElement("path",{d:"M200.538 62.2879C208.763 62.2879 215.43 55.6302 215.43 47.4174C215.43 39.2046 208.763 32.5469 200.538 32.5469C192.314 32.5469 185.646 39.2046 185.646 47.4174C185.646 55.6302 192.314 62.2879 200.538 62.2879Z",fill:"#A0616A"}),a.createElement("path",{d:"M197.505 58.7068L198.608 72.4758L216.258 66.9682C216.258 66.9682 209.639 56.5038 211.294 53.75L197.505 58.7068Z",fill:"#A0616A"}),a.createElement("path",{d:"M197.505 66.9686C197.505 66.9686 207.955 69.7224 214.037 63.1133L226.738 69.1716L210.191 130.857L175.443 121.494L180.958 109.377C180.958 109.377 173.788 101.116 181.51 93.4051C181.51 93.4051 183.165 77.9838 188.129 74.6793C191.469 72.3813 194.606 69.8016 197.505 66.9686Z",fill:"#D0CDE1"}),a.createElement("path",{d:"M213.776 62.8398C213.776 62.8398 195.023 77.7104 215.43 121.771C235.838 165.832 252.936 203.284 259.555 201.081C266.174 198.878 288.787 181.804 281.066 175.746C273.344 169.687 240.802 150.411 236.39 125.076C231.977 99.7408 242.457 73.8551 242.457 73.8551L213.776 62.8398Z",fill:"#575A89"}),a.createElement("path",{d:"M234.459 79.6367L281.893 159.497L268.656 165.005L227.841 109.929L234.459 79.6367Z",fill:"#575A89"}),a.createElement("path",{d:"M178.201 119.84H174.34L159.999 150.682C159.999 150.682 132.973 232.195 135.731 248.718C138.489 265.241 241.08 263.017 235.562 262.487C230.313 261.982 203.002 136.392 211.018 129.478L178.201 119.84Z",fill:"#1D283D"}),a.createElement("path",{d:"M156.69 290.578C156.69 290.578 155.587 286.172 151.174 286.172C146.762 286.172 146.762 292.23 146.762 292.23L134.076 303.796C134.076 303.796 123.045 317.565 137.386 317.565C151.726 317.565 151.726 314.261 151.726 314.261C151.726 314.261 155.587 310.405 158.896 312.608C162.206 314.811 169.927 310.405 168.824 308.202C167.721 305.999 166.073 291.747 164.967 294.192C163.86 296.636 156.69 290.578 156.69 290.578Z",fill:"#1D283D"}),a.createElement("path",{d:"M230.047 283.967C230.047 283.967 231.15 283.416 225.634 283.967C220.119 284.518 217.913 283.967 217.913 283.967L221.773 298.837C221.773 298.837 218.464 324.172 229.495 321.969C240.526 319.766 240.526 304.345 240.526 304.345C240.526 304.345 238.872 290.576 239.975 289.474C241.078 288.373 240.526 273.502 238.872 273.502C237.217 273.502 229.231 269.934 229.231 269.934C229.231 269.934 234.459 283.967 230.047 283.967Z",fill:"#1D283D"}),a.createElement("path",{d:"M200.991 48.3061C200.065 46.8819 200.533 44.9455 199.883 43.3761C198.863 40.9116 195.691 40.3342 193.03 40.1094C191.267 39.8834 189.482 39.8881 187.721 40.1235C186.942 40.2528 186.204 40.5609 185.565 41.0236C184.926 41.4862 184.403 42.0908 184.038 42.7896C183.644 43.5781 183.744 41.1076 183.996 37.9363C184.251 34.7 185.529 31.6283 187.645 29.1636C189.761 26.699 192.606 24.9687 195.769 24.222C195.807 24.2132 195.844 24.2046 195.881 24.1961C199.121 23.4497 202.462 22.9004 205.765 23.2879C209.067 23.6753 212.359 25.0988 214.42 27.7044C215.362 28.8953 216.028 30.2997 217.08 31.3953C218.927 33.3204 221.666 34.0209 224.182 34.9142C227.066 35.843 229.721 37.3721 231.97 39.4007C234.146 41.4913 235.688 44.3561 235.734 47.3712C235.787 50.8884 233.547 54.5181 229.936 55.2115C229.308 55.3208 228.715 55.5764 228.205 55.9575C224.758 58.6266 228.69 61.4206 228.663 64.4254C228.64 66.9326 225.845 68.5667 223.337 68.6836C220.992 68.7257 218.705 67.9521 216.869 66.4953C215.032 65.0385 213.761 62.9893 213.271 60.6988C212.893 58.6412 213.185 56.5279 213.431 54.4504C213.713 52.0723 208.584 46.4726 211.972 50.577C212.633 51.3571 213.08 52.2957 213.267 53.3003C213.831 56.5792 210.843 57.6821 208.959 59.499C207.924 60.5266 207.199 61.8232 206.864 63.2417C206.53 64.6602 206.601 66.1438 207.069 67.5242C205.515 66.1186 204.501 64.2154 204.202 62.1431C203.904 60.0708 204.339 57.9594 205.433 56.1733C206.04 55.2437 206.822 54.435 207.397 53.4857C208.295 52.0045 208.543 48.7826 206.029 48.8711C204.235 48.9343 202.371 50.4261 200.991 48.3061Z",fill:"#1D283D"}),a.createElement("path",{d:"M75.6928 309.436C75.6928 309.436 53.5498 268.623 0 286.271L75.6928 309.436Z",fill:"#F0F0F5"}),a.createElement("path",{d:"M77.028 308.439C77.028 308.439 49.6438 273.681 89.1687 230.32L77.028 308.439Z",fill:"#F0F0F5"})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0"},a.createElement("rect",{width:"410",height:"325",fill:"white"}))))),a.createElement("div",{className:"u-marg-bottom"},a.createElement(c.Z,{size:"large",bold:!0},e(g.W.Step.Addon.NotFound.Title))),a.createElement(Z.ZP,{color:h.Il.DarkGrey},e(g.W.Step.Addon.NotFound.Message)))}var M=l(6409),D=function(){var e=(0,a.useContext)(d.hy),t=(0,a.useContext)(d.Qm),l=(0,s.WP)().hotel,n=e.getAllValidRows(),i=(0,a.useState)(null),r=(0,u.Z)(i,2),c=r[0],m=r[1],E=(0,a.useState)(!1),g=(0,u.Z)(E,2),h=g[0],L=g[1];return a.useEffect((function(){L(!0),o.Z.Addons.findAddons(n,null==l?void 0:l.hotelID).then((function(e){L(!1),m(e)}))}),[t.currentLanguage]),a.createElement("div",{className:"u-flex"},a.createElement(M.i5,null,a.createElement(M.mV,null,h?a.createElement(C.Z,null):null!=c&&c.length?c.map((function(e,t){return a.createElement(x,{key:t,className:"u-marg-bottom",addon:e})})):a.createElement(w,null)),a.createElement(M.f,null,a.createElement(f.Z,null))))},S=l(370),R=l(5692),k=l(292),_=l(8279),I=l(6337),T=l(6712);function F(){var e=(0,a.useContext)(d.g7),t=(0,a.useContext)(d.aN).currentStep,l=(0,a.useContext)(d.hy).currentBasketRows,u=(0,i.$)().t,o=(0,I.z)().raise;return(0,a.useEffect)((function(){var e=new T.e(l);o(e)}),[]),a.createElement("div",{className:"container"},a.createElement(S.default,null),a.createElement(M.i5,null,a.createElement(M.mV,null,e.screenSize>k.Z.Medium&&a.createElement(a.Fragment,null,a.createElement(n.rU,{to:R.Z.getPreviousStepUrl(t)},a.createElement(r.Z,null)),a.createElement("div",{className:"u-marg-top--light u-marg-bottom--heavy"},a.createElement(c.Z,{bold:!0},u(g.W.Navigation.Steps.Addon))))),e.screenSize>k.Z.Medium&&a.createElement(M.f,null,a.createElement(_.Z,null))),e.screenSize>k.Z.Medium&&a.createElement(m.Z,null),a.createElement(D,null))}}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[201],{6712:function(e,t,l){l.d(t,{e:function(){return m}});var a=l(5671),n=l(3144),i=l(136),r=l(2963),c=l(1120);var m=function(e){(0,i.Z)(u,e);var t,l,m=(t=u,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=(0,c.Z)(t);if(l){var n=(0,c.Z)(this).constructor;e=Reflect.construct(a,arguments,n)}else e=a.apply(this,arguments);return(0,r.Z)(this,e)});function u(e){var t;return(0,a.Z)(this,u),(t=m.call(this)).basketRows=void 0,t.basketRows=e,t}return(0,n.Z)(u,null,[{key:"getLabel",value:function(){return"View/Addon"}}]),u}(l(7112).x)},2201:function(e,t,l){l.r(t),l.d(t,{default:function(){return F}});var a=l(7294),n=l(3727),i=l(6793),r=l(3821),c=l(3010),m=l(9874),u=l(885),o=l(8442),d=l(360),s=l(7688),C=l(7832),f=l(1972),E=l(9366),g=l(9478),h=l(7754),L=l(4854),v=l(858),p=l(6380),Z=l(584),y=l(4184),N=l.n(y),b=function(e){return a.createElement("div",{className:e.className},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("rect",{width:"24",height:"24",rx:"12",fill:h.Il.Accent}),a.createElement("path",{d:"M7.33333 12L10.6667 15.3333L16.6667 9.33332L15.7267 8.38666L10.6667 13.4467L8.27333 11.06L7.33333 12Z",fill:"white"})))},P=l(3351),A=l(4744),x=function(e){var t,l,n=e.addon,r=e.className,m=(0,i.$)().t,o=(0,s.WP)().hotel,C=a.useContext(d.hy),f=C.getRowForAddon(n),y=(0,a.useState)(1),x=(0,u.Z)(y,2),w=x[0],M=x[1],D=(0,a.useState)(f?f.getAdultQuantity():1),S=(0,u.Z)(D,2),R=S[0],k=S[1],_=(0,a.useState)(f?f.getChildQuantity():0),I=(0,u.Z)(_,2),T=I[0],F=I[1],O=(0,a.useState)({quantity:1}),W=(0,u.Z)(O,2),G=W[0],H=W[1],V=(0,a.useState)(f?f.getSelectedDate():""),z=(0,u.Z)(V,2),Q=z[0],U=z[1],q=(0,a.useState)(f?f.getSelectedTime():""),Y=(0,u.Z)(q,2),B=Y[0],j=Y[1];(0,a.useEffect)((function(){var e,t,l,a,i,r,c;f?(H(null!==(e=n.availability[f.getSelectedDate()])&&void 0!==e?e:n.availability[n.firstDate]),U(null!==(t=f.getSelectedDate())&&void 0!==t?t:n.firstDate),j(null!==(l=f.getSelectedTime())&&void 0!==l?l:""),M(f.getQuantity()),k(f.getAdultQuantity()),F(f.getChildQuantity())):(H(null!==(a=n.availability[n.firstDate])&&void 0!==a?a:[]),U(n.firstDate),j((null===(i=n.availability[n.firstDate])||void 0===i||null===(r=i.selectorTimes)||void 0===r||null===(c=r[0])||void 0===c?void 0:c.value)||""))}),[]);var $=N()({"--active":!!C.getRowForAddon(n)}),J=[{name:"Date",enabled:(null==f||null===(t=f.getNumberOfAvailableNights)||void 0===t?void 0:t.call(f))>1&&!(null!=f&&f.getAddon().hideDatePicker),element:a.createElement(P.P,{nativeOnMobile:!0,options:n.selectorDates,value:Q,onChange:function(e){var t,l,a,i;t=e,H(n.availability[t]),U(t),j((null===(l=n.availability[t])||void 0===l||null===(a=l.selectorTimes)||void 0===a||null===(i=a[0])||void 0===i?void 0:i.value)||""),n.availability[t].quantity<w&&M(n.availability[t].quantity)},keyName:"value",labelName:"text",className:"u-flex align-items-center"})},{name:"Time",enabled:0!==(null==G||null===(l=G.selectorTimes)||void 0===l?void 0:l.length),element:a.createElement(P.P,{nativeOnMobile:!0,options:(null==G?void 0:G.selectorTimes)||[],value:B,onChange:function(e){j(e)},keyName:"value",labelName:"text",className:"u-flex align-items-center"})},{name:g.W.Step.Addon.Quantity,enabled:null==G?void 0:G.price,element:a.createElement(p.Z,{number:w,min:1,max:G.quantity,onChange:function(e){M(e)}})},{name:g.W.Step.Date.Adult_plural,enabled:null==G?void 0:G.adultPrice,element:a.createElement(p.Z,{number:R,min:0,max:G.quantity-T,onChange:function(e){k(e)}})},{name:g.W.Step.Date.Child_plural,enabled:null==G?void 0:G.childPrice,element:a.createElement(p.Z,{number:T,min:0,max:G.quantity-R,onChange:function(e){F(e)}})}],K=function(){switch(n.pricingType){case E.VO.PER_STAY:return m(g.W.Misc.QTY);case E.VO.PER_PERSON:return m(g.W.Misc.Person);case E.VO.PER_PERSON_OCCUPANCY_PER_NIGHT:case E.VO.PER_PERSON_PER_NIGHT:return m(g.W.Misc.PersonPerNight);case E.VO.PER_ADULT_OCCUPANCY_PER_NIGHT:case E.VO.PER_CHILD_OCCUPANCY_PER_NIGHT:return m(g.W.Misc.AdultPerNight);case E.VO.PER_NIGHT:case E.VO.PER_QUANTITY_NAME_PER_NIGHT:return m(g.W.Misc.Night);case E.VO.PER_ROOM_QUANTITY_PER_NIGHT:return m(g.W.Misc.PerRoomDay)}}(),X={};return n.image?X.backgroundImage="url('".concat(A.Z.resizeImage(n.image,A.h.Original),"')"):(X.backgroundImage="url('".concat((null==o?void 0:o.logo)&&A.Z.resizeImage(null==o?void 0:o.logo,A.h.Original),"')"),X.backgroundSize="50%",X.backgroundRepeat="no-repeat"),a.createElement("div",{className:N()("u-flex u-flex-flex-start u-rounded addon-card-wrapper",r,$),style:{backgroundColor:h.Il.White}},a.createElement("div",{className:"addon-card-image",style:X}),a.createElement("div",{className:"u-marg-heavy u-marg@m- u-w-100@xl"},a.createElement("div",{className:"u-flex"},a.createElement(c.Z,{bold:!0},n.name),f?a.createElement(b,null):a.createElement(a.Fragment,null)),a.createElement(Z.ZP,{color:h.Il.DarkGrey,type:Z.yG.Small},n.description),a.createElement("div",{className:"addon-card-wrapper--price u-flex u-flex-align-flex-end"},a.createElement("div",{className:"u-w-100"},J.map((function(e){if(e.enabled)return a.createElement("div",{key:e.name,className:"u-flex justify-content-start u-marg-bot u-marg-top"},a.createElement(Z.ZP,{className:"u-mw-100",bold:!0},m(e.name)),e.element)}))),a.createElement("div",{className:"addon-card-wrapper--price-action"},a.createElement("div",{className:"u-flex u-flex-direction-column u-flex-align-flex-end",style:{alignSelf:"flex-end"}},a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.Navy,inline:!0},m(g.W.Misc.From)),a.createElement("div",{className:"room-details--content-price flex-align-items-baseline flex-row"},(null==G?void 0:G.price)&&a.createElement(a.Fragment,null,a.createElement("div",{className:"u-flex align-items-end"},a.createElement(c.Z,{size:"large",bold:!0,lineHeight:"1em"},a.createElement(v.Z,{hideDecimals:!0},G.price)),a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",K))),(!(null==G||!G.adultPrice)||!(null==G||!G.childPrice))&&a.createElement("h2",{className:"u-marg-none d-flex flex-wrap justify-content-end"},!!G.adultPrice&&a.createElement("div",{className:"d-flex align-items-end flex-row"},a.createElement(c.Z,{size:"large",bold:!0,lineHeight:"1em"},a.createElement(v.Z,null,G.adultPrice)),a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",m(g.W.Step.Date.Adult))),!!G.adultPrice&&!!G.childPrice&&a.createElement("br",null),!!G.childPrice&&a.createElement("div",{className:"d-flex align-items-end flex-row"},a.createElement(c.Z,{size:"large",bold:!0,lineHeight:"1em"},a.createElement(v.Z,null,G.childPrice)),a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.DarkGrey,inline:!0,className:"u-marg-left--light u-clear-font-weight"},"/ ",m(g.W.Step.Date.Child))))),a.createElement("div",{className:"u-marg-bottom--light"},a.createElement(Z.ZP,{type:Z.yG.Small,color:h.Il.Grey,inline:!0,className:"u-nowrap"},m(g.W.Step.Addon.IncludingFeesAndTaxes)))),a.createElement("div",{className:"u-marg-top--light u-flex justify-content-end u-w-100@l- flex-column flex-lg-row"},f?a.createElement("div",{className:"u-marg-right--light@l u-marg-bottom--light@l-"},a.createElement(L.Z,{onClick:function(){var e=C.basketAddonRows.find((function(e){return e.getAddon().code===n.code}));e&&C.removeBasketAddonRow(e)},textColor:h.Il.White,backgroundColor:h.Il.Navy,wide:!0},m(g.W.Step.Addon.Remove))):a.createElement(a.Fragment,null),a.createElement(L.Z,{onClick:function(){C.setAddonQuantities(n,{quantity:w,adult:R,child:T},Q,B)},primary:!0,filled:!0,wide:!0},m(f?g.W.Step.Addon.UpdateCart:g.W.Step.Addon.AddToCart)))))))};function w(){var e=(0,i.$)().t;return a.createElement("div",{className:"u-align-center"},a.createElement("div",{className:"u-marg-bottom--heavy"},a.createElement("svg",{width:"310",height:"225",viewBox:"0 0 410 325",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("g",{clipPath:"url(#clip0)"},a.createElement("path",{d:"M363.971 303.844L404.823 243.18L364.054 310.371L364.14 317.197C361.157 317.22 358.204 317.17 355.279 317.048L357.306 229.301L357.25 228.624L357.325 228.493L357.519 220.202L312.78 155.341L357.466 213.996L357.625 215.749L359.155 149.452L320.513 82.206L359.265 137.806L358.861 0.457132L358.861 0L358.875 0.449586L361.44 108.699L396.657 64.728L361.555 118.024L362.324 177.325L394.731 119.45L362.443 186.043L362.871 219.017L410 138.398L363.014 230.52L363.971 303.844Z",fill:"#F0F0F5"}),a.createElement("path",{d:"M207.709 324.999C303.358 324.999 380.897 321.054 380.897 316.187C380.897 311.32 303.358 307.375 207.709 307.375C112.059 307.375 34.52 311.32 34.52 316.187C34.52 321.054 112.059 324.999 207.709 324.999Z",fill:"#F0F0F5"}),a.createElement("path",{d:"M308.903 322.349C311.798 322.349 314.145 320.005 314.145 317.114C314.145 314.223 311.798 311.879 308.903 311.879C306.007 311.879 303.66 314.223 303.66 317.114C303.66 320.005 306.007 322.349 308.903 322.349Z",fill:"#1D283D"}),a.createElement("path",{d:"M309.617 208.373L295.796 171.729C295.796 171.729 297.94 164.829 292.221 165.305C286.502 165.781 271.252 171.016 271.252 171.016C271.252 171.016 266.009 171.491 273.158 178.868L285.549 217.653L289.6 215.75L276.256 177.202C276.256 177.202 275.541 174.585 278.162 173.871C280.784 173.157 290.792 168.874 291.745 171.491C292.698 174.109 305.089 211.705 305.089 211.705L309.617 208.373Z",fill:"#1D283D"}),a.createElement("path",{className:"c-image-blank-slate",d:"M272.443 233.592L299.132 313.305C301.291 314.734 303.634 315.865 306.097 316.667C308.324 317.431 310.62 317.979 312.953 318.301C313.822 318.37 314.696 318.301 315.543 318.097C329.266 315.36 376.338 290.224 376.338 290.224C376.338 290.224 352.271 215.27 348.22 206.228C344.169 197.186 335.114 200.518 335.114 200.518C335.114 200.518 289.374 212.85 282.809 215.142C282.673 215.189 282.554 215.232 282.452 215.27C279.56 216.312 277.064 218.223 275.305 220.741L275.303 220.743C268.631 224.788 272.443 233.592 272.443 233.592Z",fill:"#FF8200"}),a.createElement("path",{opacity:"0.2",d:"M291.602 212.257L291.73 212.715C293.796 212.137 295.556 216.738 295.573 216.784L324.882 297.921L325.33 297.76L321.614 287.472L361.532 269.866L364.676 278.883L365.126 278.727L338.905 203.51L338.89 203.487C338.797 203.34 336.587 199.89 333.964 200.584L334.086 201.045C336.277 200.462 338.286 203.434 338.473 203.719L344.023 219.639L302.059 233.337L296.02 216.62C295.942 216.41 294.088 211.561 291.602 212.257ZM344.18 220.089L348.268 231.816L306.956 246.893L302.221 233.785L344.18 220.089ZM311.833 260.396L307.117 247.34L348.425 232.266L352.484 243.909L311.833 260.396ZM352.64 244.359L357.09 257.123L316.509 273.339L311.995 260.844L352.64 244.359ZM321.452 287.023L316.671 273.787L357.247 257.573L361.375 269.415L321.452 287.023Z",fill:"black"}),a.createElement("path",{opacity:"0.15",d:"M275.303 230.74C277.686 234.547 304.375 314.259 304.375 314.259C304.869 315.117 305.446 315.924 306.098 316.67C308.325 317.434 310.621 317.981 312.953 318.304C313.822 318.372 314.696 318.303 315.543 318.1C313.904 317.509 310.241 315.599 308.426 309.976C306.043 302.6 279.831 224.791 279.831 224.791C279.831 224.791 280.65 218.923 282.809 215.145C282.674 215.192 282.554 215.235 282.452 215.273C279.561 216.315 277.064 218.226 275.306 220.743L275.303 220.746C275.303 220.746 272.92 226.932 275.303 230.74Z",fill:"black"}),a.createElement("path",{d:"M280.069 248.348L282.69 256.438C282.69 256.438 280.546 272.38 291.745 282.85L294.128 290.94L291.666 291.007L289.065 283.24C289.065 283.24 280.427 272.834 280.367 257.26L278.163 248.348H280.069Z",fill:"#1D283D"}),a.createElement("path",{d:"M324.987 322.466C327.882 322.466 330.229 320.122 330.229 317.231C330.229 314.34 327.882 311.996 324.987 311.996C322.091 311.996 319.744 314.34 319.744 317.231C319.744 320.122 322.091 322.466 324.987 322.466Z",fill:"#1D283D"}),a.createElement("path",{d:"M375.862 300.458C378.757 300.458 381.104 298.114 381.104 295.223C381.104 292.332 378.757 289.988 375.862 289.988C372.966 289.988 370.619 292.332 370.619 295.223C370.619 298.114 372.966 300.458 375.862 300.458Z",fill:"#1D283D"}),a.createElement("path",{d:"M187.577 72.4766C187.577 72.4766 175.443 74.6796 174.891 79.6365C174.576 83.1175 174.576 86.6199 174.891 90.1009L187.577 72.4766Z",fill:"#575A89"}),a.createElement("path",{d:"M257.073 188.137C257.073 188.137 221.774 200.805 198.608 189.79C175.443 178.774 147.314 165.005 147.314 165.005C147.314 165.005 133.525 166.107 135.179 157.846C136.834 149.584 147.865 101.668 173.237 85.6959C173.237 85.6959 188.68 65.8685 197.505 66.97C206.33 68.0716 240.527 149.584 240.527 149.584L257.073 188.137Z",fill:"#575A89"}),a.createElement("path",{opacity:"0.2",d:"M257.073 188.137C257.073 188.137 221.774 200.805 198.608 189.79C175.443 178.774 147.314 165.005 147.314 165.005C147.314 165.005 133.525 166.107 135.179 157.846C136.834 149.584 147.865 101.668 173.237 85.6959C173.237 85.6959 188.68 65.8685 197.505 66.97C206.33 68.0716 240.527 149.584 240.527 149.584L257.073 188.137Z",fill:"black"}),a.createElement("path",{d:"M275.826 158.395L278.032 163.902C278.032 163.902 292.373 172.714 286.306 178.773C280.238 184.831 271.106 168.584 271.106 168.584L267.553 161.699L275.826 158.395Z",fill:"#A0616A"}),a.createElement("path",{d:"M155.035 256.98L152.829 294.983L164.412 299.94L168.824 254.227L155.035 256.98Z",fill:"#A0616A"}),a.createElement("path",{d:"M201.917 256.98L217.361 276.808L221.773 290.026L232.805 289.475L235.562 276.257L220.119 260.836L201.917 256.98Z",fill:"#A0616A"}),a.createElement("path",{d:"M200.538 62.2879C208.763 62.2879 215.43 55.6302 215.43 47.4174C215.43 39.2046 208.763 32.5469 200.538 32.5469C192.314 32.5469 185.646 39.2046 185.646 47.4174C185.646 55.6302 192.314 62.2879 200.538 62.2879Z",fill:"#A0616A"}),a.createElement("path",{d:"M197.505 58.7068L198.608 72.4758L216.258 66.9682C216.258 66.9682 209.639 56.5038 211.294 53.75L197.505 58.7068Z",fill:"#A0616A"}),a.createElement("path",{d:"M197.505 66.9686C197.505 66.9686 207.955 69.7224 214.037 63.1133L226.738 69.1716L210.191 130.857L175.443 121.494L180.958 109.377C180.958 109.377 173.788 101.116 181.51 93.4051C181.51 93.4051 183.165 77.9838 188.129 74.6793C191.469 72.3813 194.606 69.8016 197.505 66.9686Z",fill:"#D0CDE1"}),a.createElement("path",{d:"M213.776 62.8398C213.776 62.8398 195.023 77.7104 215.43 121.771C235.838 165.832 252.936 203.284 259.555 201.081C266.174 198.878 288.787 181.804 281.066 175.746C273.344 169.687 240.802 150.411 236.39 125.076C231.977 99.7408 242.457 73.8551 242.457 73.8551L213.776 62.8398Z",fill:"#575A89"}),a.createElement("path",{d:"M234.459 79.6367L281.893 159.497L268.656 165.005L227.841 109.929L234.459 79.6367Z",fill:"#575A89"}),a.createElement("path",{d:"M178.201 119.84H174.34L159.999 150.682C159.999 150.682 132.973 232.195 135.731 248.718C138.489 265.241 241.08 263.017 235.562 262.487C230.313 261.982 203.002 136.392 211.018 129.478L178.201 119.84Z",fill:"#1D283D"}),a.createElement("path",{d:"M156.69 290.578C156.69 290.578 155.587 286.172 151.174 286.172C146.762 286.172 146.762 292.23 146.762 292.23L134.076 303.796C134.076 303.796 123.045 317.565 137.386 317.565C151.726 317.565 151.726 314.261 151.726 314.261C151.726 314.261 155.587 310.405 158.896 312.608C162.206 314.811 169.927 310.405 168.824 308.202C167.721 305.999 166.073 291.747 164.967 294.192C163.86 296.636 156.69 290.578 156.69 290.578Z",fill:"#1D283D"}),a.createElement("path",{d:"M230.047 283.967C230.047 283.967 231.15 283.416 225.634 283.967C220.119 284.518 217.913 283.967 217.913 283.967L221.773 298.837C221.773 298.837 218.464 324.172 229.495 321.969C240.526 319.766 240.526 304.345 240.526 304.345C240.526 304.345 238.872 290.576 239.975 289.474C241.078 288.373 240.526 273.502 238.872 273.502C237.217 273.502 229.231 269.934 229.231 269.934C229.231 269.934 234.459 283.967 230.047 283.967Z",fill:"#1D283D"}),a.createElement("path",{d:"M200.991 48.3061C200.065 46.8819 200.533 44.9455 199.883 43.3761C198.863 40.9116 195.691 40.3342 193.03 40.1094C191.267 39.8834 189.482 39.8881 187.721 40.1235C186.942 40.2528 186.204 40.5609 185.565 41.0236C184.926 41.4862 184.403 42.0908 184.038 42.7896C183.644 43.5781 183.744 41.1076 183.996 37.9363C184.251 34.7 185.529 31.6283 187.645 29.1636C189.761 26.699 192.606 24.9687 195.769 24.222C195.807 24.2132 195.844 24.2046 195.881 24.1961C199.121 23.4497 202.462 22.9004 205.765 23.2879C209.067 23.6753 212.359 25.0988 214.42 27.7044C215.362 28.8953 216.028 30.2997 217.08 31.3953C218.927 33.3204 221.666 34.0209 224.182 34.9142C227.066 35.843 229.721 37.3721 231.97 39.4007C234.146 41.4913 235.688 44.3561 235.734 47.3712C235.787 50.8884 233.547 54.5181 229.936 55.2115C229.308 55.3208 228.715 55.5764 228.205 55.9575C224.758 58.6266 228.69 61.4206 228.663 64.4254C228.64 66.9326 225.845 68.5667 223.337 68.6836C220.992 68.7257 218.705 67.9521 216.869 66.4953C215.032 65.0385 213.761 62.9893 213.271 60.6988C212.893 58.6412 213.185 56.5279 213.431 54.4504C213.713 52.0723 208.584 46.4726 211.972 50.577C212.633 51.3571 213.08 52.2957 213.267 53.3003C213.831 56.5792 210.843 57.6821 208.959 59.499C207.924 60.5266 207.199 61.8232 206.864 63.2417C206.53 64.6602 206.601 66.1438 207.069 67.5242C205.515 66.1186 204.501 64.2154 204.202 62.1431C203.904 60.0708 204.339 57.9594 205.433 56.1733C206.04 55.2437 206.822 54.435 207.397 53.4857C208.295 52.0045 208.543 48.7826 206.029 48.8711C204.235 48.9343 202.371 50.4261 200.991 48.3061Z",fill:"#1D283D"}),a.createElement("path",{d:"M75.6928 309.436C75.6928 309.436 53.5498 268.623 0 286.271L75.6928 309.436Z",fill:"#F0F0F5"}),a.createElement("path",{d:"M77.028 308.439C77.028 308.439 49.6438 273.681 89.1687 230.32L77.028 308.439Z",fill:"#F0F0F5"})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0"},a.createElement("rect",{width:"410",height:"325",fill:"white"}))))),a.createElement("div",{className:"u-marg-bottom"},a.createElement(c.Z,{size:"large",bold:!0},e(g.W.Step.Addon.NotFound.Title))),a.createElement(Z.ZP,{color:h.Il.DarkGrey},e(g.W.Step.Addon.NotFound.Message)))}var M=l(6409),D=function(){var e=(0,a.useContext)(d.hy),t=(0,a.useContext)(d.Qm),l=(0,s.WP)().hotel,n=e.getAllValidRows(),i=(0,a.useState)(null),r=(0,u.Z)(i,2),c=r[0],m=r[1],E=(0,a.useState)(!1),g=(0,u.Z)(E,2),h=g[0],L=g[1];return a.useEffect((function(){L(!0),o.Z.Addons.findAddons(n,null==l?void 0:l.hotelID).then((function(e){L(!1),m(e)}))}),[t.currentLanguage]),a.createElement("div",{className:"u-flex"},a.createElement(M.i5,null,a.createElement(M.mV,null,h?a.createElement(C.Z,null):null!=c&&c.length?c.map((function(e,t){return a.createElement(x,{key:t,className:"u-marg-bottom",addon:e})})):a.createElement(w,null)),a.createElement(M.f,null,a.createElement(f.Z,null))))},S=l(370),R=l(5692),k=l(292),_=l(8279),I=l(6337),T=l(6712);function F(){var e=(0,a.useContext)(d.g7),t=(0,a.useContext)(d.aN).currentStep,l=(0,a.useContext)(d.hy).currentBasketRows,u=(0,i.$)().t,o=(0,I.z)().raise;return(0,a.useEffect)((function(){var e=new T.e(l);o(e)}),[]),a.createElement("div",{className:"container"},a.createElement(S.default,null),a.createElement(M.i5,null,a.createElement(M.mV,null,e.screenSize>k.Z.Medium&&a.createElement(a.Fragment,null,a.createElement(n.rU,{to:R.Z.getPreviousStepUrl(t)},a.createElement(r.Z,null)),a.createElement("div",{className:"u-marg-top--light u-marg-bottom--heavy"},a.createElement(c.Z,{bold:!0},u(g.W.Navigation.Steps.Addon))))),e.screenSize>k.Z.Medium&&a.createElement(M.f,null,a.createElement(_.Z,null))),e.screenSize>k.Z.Medium&&a.createElement(m.Z,null),a.createElement(D,null))}}}]);
@@ -1 +1 @@
1
- (("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[213],{5032:function(e,t,n){"use strict";n.d(t,{z:function(){return c}});var r=n(5671),a=n(3144),o=n(136),l=n(2963),i=n(1120);var c=function(e){(0,o.Z)(s,e);var t,n,c=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,i.Z)(t);if(n){var a=(0,i.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function s(e){var t;return(0,r.Z)(this,s),(t=c.call(this)).basketRows=void 0,t.basketRows=e,t}return(0,a.Z)(s,null,[{key:"getLabel",value:function(){return"View/Checkout"}}]),s}(n(7112).x)},2213:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ft}});var r=n(7294),a=n(3010),o=n(5692),l=n(3933),i=n(3727),c=n(9874),s=n(3821),u=n(9478),d=n(370),m=n(292),p=n(8279),f=n(6793),g=n(7462),v=n(885),A=n(8886),C=n(584),y=n(7754),h=n(4184),E=n.n(h),b=n(4744);function _(e){var t=e.addon,n=(0,f.$)().t;return r.createElement("div",{className:E()("additional-offers--column",{"--selected":e.selected}),style:{backgroundImage:"url('".concat(t.image&&b.Z.resizeImage(t.image,b.h.Original),"')")},onClick:function(){var t;null===(t=e.cardClicked)||void 0===t||t.call(e)}},r.createElement("div",{className:"additional-offers--column-body"},r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.White},r.createElement("strong",null,t.name)),r.createElement("div",{className:"u-flex"},r.createElement(C.ZP,{inline:!0,type:C.yG.Small,color:y.Il.White},n(u.W.Misc.SeeDetails)),r.createElement(A.ZP,{icon:A.Tu.ArrowRight,color:y.Il.White}))))}var x=n(8144),k=n(3460),Z=n(7582),P=n(5128),S=n(6380),w=n(4854),N=n(858),R=n(360),I=n(3351);function B(e){var t,n=e.addon,o=((0,f.$)().t,(0,r.useContext)(R.hy)),l=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getSelectedDate():""),i=(0,v.Z)(l,2),c=i[0],s=i[1],u=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getSelectedTime():""),d=(0,v.Z)(u,2),m=d[0],p=d[1],g=(0,r.useState)({quantity:1}),A=(0,v.Z)(g,2),h=A[0],E=A[1],_=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getQuantity():1),x=(0,v.Z)(_,2),k=x[0],Z=x[1],B=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getAdultQuantity():1),W=(0,v.Z)(B,2),M=W[0],D=W[1],T=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getChildQuantity():0),G=(0,v.Z)(T,2),O=G[0],U=G[1];return r.useEffect((function(){var t,r,a,o,l,i;if(n)return e.basketAddonRow?(E(null!==(t=n.availability[e.basketAddonRow.getSelectedDate()])&&void 0!==t?t:n.availability[n.firstDate]),s(null!==(r=e.basketAddonRow.getSelectedDate())&&void 0!==r?r:n.firstDate),p(null!==(a=e.basketAddonRow.getSelectedTime())&&void 0!==a?a:""),Z(e.basketAddonRow.getQuantity()),D(e.basketAddonRow.getAdultQuantity()),U(e.basketAddonRow.getChildQuantity())):(E(n.availability[n.firstDate]),s(n.firstDate),p((null===(o=n.availability[n.firstDate])||void 0===o||null===(l=o.selectorTimes)||void 0===l||null===(i=l[0])||void 0===i?void 0:i.value)||"")),function(){Z(1),D(1),U(0)}}),[n]),r.createElement(P.Z,{open:e.isOpen,onClose:e.onClose,size:P.g.Small,title:n?n.name:""},n&&r.createElement(r.Fragment,null,r.createElement("div",{style:{height:"350px",width:"100%",backgroundImage:'url("'.concat(n.image&&b.Z.resizeImage(n.image,b.h.Original),'")'),backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}),r.createElement("div",{className:"u-marg-heavy u-marg@m-"},r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},n.name)),r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.DarkGrey},n.description)),r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Date"),r.createElement(I.P,{nativeOnMobile:!0,options:n.selectorDates,value:c,onChange:function(e){var t,r,a,o;t=e,E(n.availability[t]),s(t),p((null===(r=n.availability[t])||void 0===r||null===(a=r.selectorTimes)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.value)||""),n.availability[t].quantity<k&&Z(n.availability[t].quantity)},keyName:"value",labelName:"text",className:"u-flex align-items-center"}))),0!==(null==h||null===(t=h.selectorTimes)||void 0===t?void 0:t.length)&&r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Time"),r.createElement(I.P,{nativeOnMobile:!0,options:(null==h?void 0:h.selectorTimes)||[],value:m,onChange:function(e){p(e)},keyName:"value",labelName:"text",className:"u-flex align-items-center"}))),h.price&&r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Quantity"),r.createElement(S.Z,{number:k,min:1,max:h.quantity,onChange:function(e){Z(e)}}))),h.adultPrice&&r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Adults"),r.createElement(S.Z,{number:M,min:0,max:h.quantity-O,onChange:function(e){D(e)}}))),h.childPrice&&r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Children"),r.createElement(S.Z,{number:O,min:0,max:h.quantity-M,onChange:function(e){U(e)}}))),r.createElement("div",{className:"u-flex align-items-center u-marg-top"},h.price&&r.createElement("h2",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.price),"/ Qty"),h.adultPrice&&h.childPrice&&r.createElement("h2",{className:"u-marg-none"},r.createElement("div",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.adultPrice)," / Adult"),r.createElement("br",null),r.createElement("div",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.childPrice)," / Child")),h.adultPrice&&!h.childPrice&&r.createElement("h2",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.adultPrice)," / Adult"),h.childPrice&&!h.adultPrice&&r.createElement("h2",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.childPrice)," / Child"),r.createElement(w.Z,{filled:!0,primary:!0,onClick:function(){o.setAddonQuantities(n,{quantity:k,adult:M,child:O},c,m),e.onClose()}},e.basketAddonRow?"Update Cart":"Add to Cart")),n.guaranteeDescription&&r.createElement(r.Fragment,null,r.createElement("h4",{className:"u-marg-bottom--light u-marg-top"},"Guarantee"),r.createElement("div",{className:"u-marg-bot--heavy"},r.createElement(C.ZP,{type:C.yG.Small},n.guaranteeDescription))),n.cancelPenalty&&r.createElement(r.Fragment,null,r.createElement("h4",{className:"u-marg-bottom--light u-marg-top"},"Cancellation Policy"),r.createElement("div",{className:"u-marg-bot--heavy"},r.createElement(C.ZP,{type:C.yG.Small},n.cancelPenalty))))))}var W=n(4516),M=n(9740),D=n(7832),T=n(7688);function G(){var e=(0,r.useContext)(R.hy),t=(0,r.useContext)(R.Qm),n=(0,T.WP)().hotel,o=(0,x.q_)((function(){return{x:0}})),l=(0,v.Z)(o,2),i=l[0].x,c=l[1],s=(0,k.Z)(),d=(0,v.Z)(s,2),m=d[0],p=d[1],h=(0,f.$)().t,E=r.useState([]),b=(0,v.Z)(E,2),P=b[0],S=b[1],w=(0,r.useState)(!1),N=(0,v.Z)(w,2),I=N[0],G=N[1],O=(0,r.useState)(null),U=(0,v.Z)(O,2),q=U[0],F=U[1],L=(0,r.useState)(!1),z=(0,v.Z)(L,2),j=z[0],Q=z[1],V=(0,r.useState)(0),$=(0,v.Z)(V,2),H=$[0],J=$[1],Y=(0,r.useState)(0),K=(0,v.Z)(Y,2),X=(K[0],K[1]),ee=(0,r.useState)(-1),te=(0,v.Z)(ee,2),ne=te[0],re=te[1];r.useEffect((function(){var t=!1,r=e.getAllValidRows();return Q(!0),W.Z.Addons.findAddons(r,null==n?void 0:n.hotelID).then((function(e){t||(Q(!1),S(e))})),function(){Q(!1),t=!0}}),[t.currentLanguage]);var ae=222,oe=ae*P.length>=p.width,le=(0,Z.c0)((function(e){var t=e.down,n=(0,v.Z)(e.movement,1)[0];ie(t,n)})),ie=function(e,t){if(oe)if(e)c({x:H+1.5*t});else{var n=H+t,r=(P.length-1)*ae,a=0;if(n>0)a=0,re(-1);else if(n<-(r-p.width+ae))a=-(r-p.width+ae),re(1);else{var o=-n/ae,l=n%ae>-111?Math.floor(o):Math.ceil(o);a=-l*ae,X(l),re(0)}c({x:a}),J(a)}};return r.createElement(M.Z,{open:!j&&0!==(null==P?void 0:P.length)||!(null==n||!n.showAddonLoader)},r.createElement("div",{className:"u-pad-bottom--heavy "},r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},h(u.W.Step.Confirmation.AdditionalOfferings))),j&&null!=n&&n.showAddonLoader?r.createElement(D.Z,null):0===(null==P?void 0:P.length)?r.createElement("div",null,r.createElement(C.ZP,{color:y.Il.DarkGrey},h(u.W.Step.Confirmation.NoAdditionalOfferings))):r.createElement("div",{className:"additional-offers"+(P.length>2?"":" --wide"),ref:m},oe&&r.createElement("div",{className:"additional-offers--navigation"},r.createElement(A.ZP,{icon:A.Tu.ArrowLeft2,onClick:function(){ie(!1,ae)},color:-1===ne?y.Il.DarkGrey:y.Il.White,backgroundColor:y.Il.Navy,borderRadius:"round",size:"24px"}),r.createElement(A.ZP,{icon:A.Tu.ArrowRight2,onClick:function(){ie(!1,-222)},color:1===ne?y.Il.DarkGrey:y.Il.White,backgroundColor:y.Il.Navy,borderRadius:"round",size:"24px"})),r.createElement("div",{className:"additional-offers--track-container"},r.createElement(x.q.div,(0,g.Z)({className:"additional-offers--track"},le(),{style:{left:i}}),P.map((function(t,n){return r.createElement(_,{selected:!!e.getRowForAddon(t),key:n,addon:t,cardClicked:function(){G(!0),F(t)}})}))))),r.createElement(B,{isOpen:I&&!!q,addon:q,basketAddonRow:e.getRowForAddon(q),onClose:function(){G(!1)}})))}var O=n(7933),U=n(7484),q=n.n(U);function F(e){var t=(0,r.useState)(e.endTimeDate.diff(q()(),"second")),n=(0,v.Z)(t,2),a=n[0],o=n[1];return(0,r.useEffect)((function(){var t=!1,n=setTimeout((function(){t||(a>0?o((function(e){return e-1})):(e.onEnd&&e.onEnd(),t=!0,clearTimeout(n)))}),1e3);return function(){t=!0,clearTimeout(n)}}),[a]),(0,r.useMemo)((function(){var e=[Math.floor(a/60/60),Math.floor(a/60%60),Math.floor(a%60)];return r.createElement(r.Fragment,null,e.map((function(e){return e.toString().padStart(2,"0")})).join(":"))}),[a])}var L=n(4544);function z(e){var t=(0,r.useState)(!1),n=(0,v.Z)(t,2),o=n[0],l=n[1],i=(0,f.$)().t;return r.createElement(O.ZP,{type:O.NK.Accent1},r.createElement("div",{className:"u-flex w-100 flex-wrap align-items-center"},r.createElement("div",null,r.createElement(C.ZP,null,r.createElement("strong",null,i(u.W.Step.Confirmation.YourRoomIs))),r.createElement(C.ZP,null,r.createElement("strong",null,i(u.W.Step.Confirmation.BeingHeldFor)))),r.createElement("div",{className:o?"a-flash":""},r.createElement(a.Z,{size:"large",bold:!0,color:y.Il.White},r.createElement(F,{endTimeDate:e.endDate,onEnd:function(){L.ZP.instance.sendInteraction("Countdown End Seen",L.s_.LINK,L._J.GUEST_DETAILS),l(!0)}})))))}var j=n(4511),Q=n(5400),V=n(6337),$=n(5032),H=n(5861),J=n(4687),Y=n.n(J),K=n(7536),X=n(5987),ee=n(4942),te=n(5993),ne=n(1432),re=n(5762),ae=n(3261),oe=n(6604),le=n(1248),ie=function(e){return e.Forename="Forename",e.Surname="Surname",e.Email="Email",e.Phone="Phone",e.Address="Address",e.City="City",e.PostCode="PostCode",e.Country="Country",e}({}),ce=n(9024),se=n(6598),ue=n(6431),de=["ref","onChange"],me=function(){var e=(0,K.Gc)(),t=e.register,n=e.formState,o=e.control,l=e.watch,i=e.getValues,s=e.setValue,d=(0,r.useContext)(R.hy),m=d.getAllValidRows(),p=d.basketAddonRows,h=(0,K.Dq)({control:o,name:"userProfiles"}),E=h.update,b=h.fields,_=l(["copyCheckBox","paymentMethod"]),x=(0,v.Z)(_,2),k=x[0],Z=x[1],P=n.errors,S=(0,f.$)().t,w=(0,r.useContext)(R.P0).roomstayMember;(0,r.useEffect)((function(){var e,t;null===(e=P.userProfiles)||void 0===e||null===(t=e.forEach)||void 0===t||t.call(e,(function(e,t){var n;null!==(n=P.userProfiles)&&void 0!==n&&n[t]&&(B[t]=!0)})),W(B.slice(0))}),[P.userProfiles,k]),(0,r.useEffect)((function(){var e=function(e){return 0===e&&arguments.length>1&&void 0!==arguments[1]?arguments[1]:""},t=m.map((function(t,n){var r,a,o,l,i;return i={},(0,ee.Z)(i,ie.Forename,e(n,null==w?void 0:w.forename)),(0,ee.Z)(i,ie.Surname,e(n,null==w?void 0:w.surname)),(0,ee.Z)(i,ie.Email,e(n,null==w?void 0:w.email)),(0,ee.Z)(i,ie.Phone,e(n,null==w?void 0:w.phoneNumber)),(0,ee.Z)(i,ie.Address,e(n,null==w||null===(r=w.address)||void 0===r?void 0:r.address)),(0,ee.Z)(i,ie.City,e(n,null==w||null===(a=w.address)||void 0===a?void 0:a.city)),(0,ee.Z)(i,ie.PostCode,e(n,null==w||null===(o=w.address)||void 0===o?void 0:o.zip)),(0,ee.Z)(i,ie.Country,e(n,null==w||null===(l=w.address)||void 0===l?void 0:l.country)),i}));s("userProfiles",t),s("copyCheckBox",!!(null!=m&&m.length&&m.length>1))}),[w,null==m?void 0:m.length]);var N=(0,r.useState)(m.map((function(e,t){return 0===t}))),I=(0,v.Z)(N,2),B=I[0],W=I[1],D=function(e,t){return function(e){L.ZP.instance.sendInteraction(t,L.s_.FORM_FIELD,L._J.GUEST_DETAILS)}};return(0,r.useEffect)((function(){k&&b.forEach((function(e,t){0!==t&&E(t,i("userProfiles.0"))}))}),[k]),(0,r.useEffect)((function(){var e=l((function(e,t){var n=t.name;"change"===t.type&&null!=n&&n.includes("userProfiles")&&"0"===n.split(".")[1]&&e.copyCheckBox&&b.map((function(e,t){0!==t&&E(t,i("userProfiles.0"))}))})).unsubscribe;return function(){e()}}),[b]),(0,r.useEffect)((function(){L.ZP.instance.sendCheckoutView(m,p)}),[]),r.createElement(r.Fragment,null,b.map((function(e,l){var i,s,d,p=function(e){return function(e,t){return"userProfiles.".concat(t,".").concat(e)}(e,l)},f=function(e){var t;if(P.userProfiles&&!(k&&l>=1))return null!==(t=P.userProfiles[l])&&void 0!==t&&t[e]?"error":"success"},v=m[l],h=k&&l>=1||Z===se.EBookingPaymentMethod.Planpay;return r.createElement("div",{key:e.id},r.createElement("div",{className:0===l?"":"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom",onClick:function(){0!==l&&function(e,t){B.splice(e,1,t),W(B.slice(0))}(l,!B[l])}},r.createElement("div",{className:"u-flex u-marg-bottom align-items-center"},r.createElement(a.Z,{bold:!0},S(u.W.Misc.Room)," ",l+1),0!==l&&r.createElement(A.ZP,{icon:B[l]?A.Tu.ArrowDown2:A.Tu.ArrowUp2,color:y.Il.Grey})),v&&r.createElement("div",{className:"u-marg-bottom"},r.createElement(C.ZP,null,r.createElement("strong",{className:"u-block@l-"},v.getRoom().name)," for"," ",ae.Z.pluralWithDictAndCount(v.getAdults(),u.W.Step.Date.Adult,S),", ",ae.Z.pluralWithDictAndCount(v.getChildren(),u.W.Step.Date.Child,S)),r.createElement("div",{className:"step-one-status--dates u-flex justify-content-start"},r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.Accent},r.createElement("strong",null,v.getStartDate().format("ddd, MMM D"))),r.createElement(A.ZP,{icon:A.Tu.ArrowRight2,size:"18px"}),r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.Accent},r.createElement("strong",null,v.getEndDate().format("ddd, MMM D"))))),(i=l,(d=null===(s=P.userProfiles)||void 0===s?void 0:s[i])&&n.submitCount>=1&&(0===i||!k)&&Object.values(d).map((function(e,t){return r.createElement(M.Z,{key:t,open:!0},r.createElement("div",{className:"u-flex"},r.createElement(O.ZP,{icon:A.Tu.Error,type:O.NK.Danger,noMargin:t===Object.keys(d).length-1},r.createElement(C.ZP,{type:C.yG.Small},null==e?void 0:e.message))))})),null)),r.createElement("div",{className:"room-contact-details--row",style:{maxHeight:B[l]?void 0:0}},r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,S(u.W.Step.Confirmation.ContactInfo)))),r.createElement(te.Z,{dimensions:"2/2"},r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Forename)+" *",wide:!0,required:!0,validationStatus:f(ie.Forename)},t(p(ie.Forename),{onChange:D(p(ie.Forename),"Forename - Contact Info"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Forename)})}}))),r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Surname)+" *",wide:!0,required:!0,validationStatus:f(ie.Surname)},t(p(ie.Surname),{onChange:D(p(ie.Surname),"Surname - Contact Info"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Surname)})}})))),r.createElement(te.Z,{dimensions:"2/2"},r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Email)+" *",wide:!0,validationStatus:f(ie.Email),required:!0},t(p(ie.Email),{onChange:D(p(ie.Email),"Email - Contact Info"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Email)})},pattern:{value:ue.CU,message:S(u.W.Step.Confirmation.Inputs.InvalidEmail)}}))),le.Z.isActive()?r.createElement(K.Qr,{control:o,name:p(ie.Phone),rules:{required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Phone)})},minLength:{value:5,message:"Phone number is required"},maxLength:{value:17,message:"Phone number is too long"},pattern:{value:/^[1-9]( |\d){1,15}$/g,message:"Incorrect phone number entered"}},render:function(e){var t=e.field;return r.createElement(oe.Z,(0,g.Z)({disabled:h,validationStatus:f(ie.Phone)},t,{onChange:function(e){t.onChange(e),D(p(ie.Phone),"Phone - Contact Info")(e)}}))}}):r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Phone)+" *",wide:!0,required:!0,validationStatus:f(ie.Phone)},t(p(ie.Phone),{onChange:D(p(ie.Phone),"Phone - Contact Info"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Phone)})}}))))),r.createElement("div",{className:""},r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,S(u.W.Step.Confirmation.Address)))),r.createElement(te.Z,{dimensions:"3/1"},r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Address)+" *",wide:!0,required:!0,validationStatus:f(ie.Address)},t(p(ie.Address),{onChange:D(p(ie.Address),"Address - Address"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Address)})}}))),r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.City)+" *",wide:!0,required:!0,validationStatus:f(ie.City)},t(p(ie.City),{onChange:D(p(ie.City),"City - Address"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.City)})}})))),r.createElement(te.Z,{dimensions:"2/2"},r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.PostCode)+" *",wide:!0,required:!0,validationStatus:f(ie.PostCode)},t(p(ie.PostCode),{onChange:D(p(ie.PostCode),"PostCode - Address"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.PostCode)})}}))),r.createElement(K.Qr,{control:o,name:p(ie.Country),rules:{required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Country)})}},render:function(e){var t=e.field,n=(t.ref,t.onChange),a=(0,X.Z)(t,de);return r.createElement(re.Z,(0,g.Z)({disabled:h,validationStatus:f(ie.Country),onChange:function(e){n(e),D(p(ie.Country),"Country - Address")(e)}},a))}})))),r.createElement(c.Z,null)),b.length>1&&0===l?r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement(ce.Z,(0,g.Z)({label:S(u.W.Step.Confirmation.ApplySameInfoToOtherRooms)},t("copyCheckBox")))):null)})))};function pe(){var e=(0,f.$)().t,t=(0,T.WP)().hotel;return r.createElement(r.Fragment,null,r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},e(u.W.Step.Confirmation.Policies))),r.createElement("div",{className:"u-marg-bottom"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col-6 col-md-3"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,e(u.W.Misc.CheckIn))),r.createElement(C.ZP,{type:C.yG.Small},e(u.W.Misc.After)," ",null==t?void 0:t.checkInTime)),r.createElement("div",{className:"col-6 col-md-3"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,e(u.W.Misc.CheckOut))),r.createElement(C.ZP,{type:C.yG.Small},e(u.W.Misc.Before)," ",null==t?void 0:t.checkOutTime)))))}var fe=n(8029),ge=n(2364),ve=n(5112);function Ae(){var e=(0,f.$)().t;return r.createElement(ve.Z,{title:e(u.W.Step.Confirmation.SSLSecure)},r.createElement("img",{src:ge.Z.getAssetUrl()+"assets/img/ssl-secure-connection.png"}))}var Ce=n(3409);function ye(e){var t,n,o=(0,r.useContext)(R.hy),l=(0,f.$)().t,i=(0,r.useState)(q()().add(14,"minute")),s=(0,v.Z)(i,2),d=s[0];s[1],(0,r.useEffect)((function(){var t,n=!1,r=null;return(e.differences.length||null!==(t=e.warnings)&&void 0!==t&&t.length)&&(r=setTimeout((function(){n||e.onClose()}),74e4)),function(){n=!0,clearTimeout(r)}}),[e.differences.length,null===(t=e.warnings)||void 0===t?void 0:t.length]);var m=r.createElement("div",{className:"u-flex"},r.createElement(w.Z,{isText:!0,size:"small",icon:A.Tu.ArrowLeft,onClick:e.onClose,isLoading:e.isLoading},l(u.W.Step.Confirmation.TakeMeBack)),r.createElement(w.Z,{primary:!0,filled:!0,icon:A.Tu.ArrowRight,iconPosition:"right",onClick:e.onProceed,isLoading:e.isLoading},l(u.W.Step.Confirmation.ContinueWithReservation)));return r.createElement(P.Z,{open:!!e.differences.length||!(null===(n=e.warnings)||void 0===n||!n.length),title:l(u.W.Step.Confirmation.YourTotalPriceHasChanged),mobileFooter:m,desktopFooter:r.createElement("div",{className:"u-marg-heavy u-marg@m-"},m),size:P.g.Small,alignCenter:!0},r.createElement("div",{className:"u-marg-heavy u-marg@m-"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col-md-8"},r.createElement(C.ZP,{type:C.yG.Small},l(u.W.Step.Confirmation.ConfirmationCheckoutTitle))),r.createElement("div",{className:"col-md-4"},r.createElement(Ce.ZP,{icon:A.Tu.Time,type:Ce.Rm.Primary},r.createElement("span",{className:"u-marg-right--light"},l(u.W.Step.Confirmation.RevertsIn)),r.createElement(F,{endTimeDate:d})))),r.createElement(c.Z,null),!(!e.differences||!e.differences.length)&&e.differences.map((function(e){var t,n,l,i=o.getAllValidRows().find((function(t){return t.getID()===e.id}));return r.createElement("div",{key:e.id},!!i&&r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(a.Z,null,i.getRoom().name)),r.createElement(C.ZP,null,null===(t=i.getRate())||void 0===t?void 0:t.name)),r.createElement("div",{className:"u-flex u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Body},r.createElement("strong",null,"Displayed price:")),r.createElement(C.ZP,{color:y.Il.Alert},r.createElement(N.Z,null,null===(n=e.totalPrice)||void 0===n?void 0:n.before))),r.createElement("div",{className:"u-flex"},r.createElement(C.ZP,{type:C.yG.Body},r.createElement("strong",null,"Actual price:")),r.createElement(C.ZP,{color:y.Il.Success},r.createElement(N.Z,null,null===(l=e.totalPrice)||void 0===l?void 0:l.after))),r.createElement(c.Z,null))})),!(!e.warnings||!e.warnings.length)&&e.warnings.map((function(e,t){return r.createElement(C.ZP,{key:t},e)}))))}var he=n(1625);function Ee(){var e=(0,r.useContext)(R.hy),t=(0,f.$)().t,n=t(u.W.Misc.Room);return(0,r.useMemo)((function(){var a={},o=e.getAllValidRows(),l=0;return o.length>1?o.forEach((function(e){l++;var t=e.getRate(),n=a["".concat(null==t?void 0:t.cancelPolicyCode,"-").concat(null==t?void 0:t.guaranteeCode)];n||(n=a["".concat(null==t?void 0:t.cancelPolicyCode,"-").concat(null==t?void 0:t.guaranteeCode)]={rooms:[]}),n.rooms.push({index:l,room:e})})):a[0]={rooms:[{index:1,room:o[0]}]},r.createElement("div",{className:"u-marg-bottom"},Object.values(a).map((function(e,a){var o,l,i=e.rooms[0];return r.createElement("div",{className:"u-marg-bottom--heavy",key:a},r.createElement("div",{className:"u-marg-bottom"},e.rooms.map((function(e){var t;return r.createElement(C.ZP,{key:e.index,type:C.yG.Small},r.createElement("strong",null,n," ",e.index)," ",e.room.getRoom().name," - ",null===(t=e.room.getRate())||void 0===t?void 0:t.name)}))),r.createElement("div",{className:"u-marg-bottom"},r.createElement(C.ZP,{type:C.yG.Small,bold:!0},t(u.W.Misc.GuaranteePolicy)),r.createElement(C.ZP,{type:C.yG.Small,preformatted:!0},r.createElement("span",{dangerouslySetInnerHTML:{__html:(null===(o=i.room.getRate())||void 0===o?void 0:o.getGuaranteePolicy())||""}}))),r.createElement(C.ZP,{type:C.yG.Small,bold:!0},t(u.W.Misc.CancellationPolicy)),r.createElement(C.ZP,{type:C.yG.Small,preformatted:!0},r.createElement("span",{dangerouslySetInnerHTML:{__html:(null===(l=i.room.getRate())||void 0===l?void 0:l.getCancellationPolicy())||""}})))})))}),[e.currentBasketRows])}var be=r.forwardRef((function(e,t){var n=(0,f.$)().t,o=e.confirmationPolicyError,l=(0,T.WP)().hotel;return r.createElement(r.Fragment,null,r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},n(u.W.Step.Confirmation.Acknowledgement))),r.createElement("div",null,r.createElement(ce.Z,{label:n(u.W.Step.Confirmation.EmailSpecialOffers)})),r.createElement("div",{className:"u-marg-top--light"},r.createElement(ce.Z,{ref:t,label:r.createElement("div",null,n(u.W.Step.Confirmation.IHaveUnderstoodPrivacyPolicy)," ",r.createElement("a",{style:{color:y.Il.Accent},className:"--underlined",href:null==l?void 0:l.privacyPolicyUrl,target:"_blank",rel:"noreferrer"},n(u.W.Step.Confirmation.PrivacyPolicy)))})),r.createElement(M.Z,{open:o},r.createElement("div",{className:"u-flex u-marg-top"},r.createElement(O.ZP,{type:O.NK.Danger,icon:A.Tu.Error},r.createElement(C.ZP,{type:C.yG.Small},n(u.W.Step.Confirmation.PrivacyPolicyError))))))})),_e=n(8555),xe=n(6222),ke=n(8016),Ze=(0,r.createContext)({}),Pe=function(){return(0,r.useContext)(Ze)},Se=n(5758),we=function(){var e=(0,Se.u)(),t=(0,Se.a)(),n=(0,r.useMemo)((function(){return["paymentMethod","roomstayId","planpay_checkout_id"].map((function(n){return t.get(n)||e.get(n)}))}),[e,t]),a=(0,v.Z)(n,3);return{queryPaymentMethod:a[0],queryRoomstayId:a[1],queryPlanpayCheckoutId:a[2]}},Ne=n(8440),Re=n.n(Ne),Ie=function(e,t){var n,a=e.checked,o=e.onChange,l=e.disabled,i=e.label,c=e.renderContent,s=e.className,u=e.headerRef;return r.createElement("div",{className:E()(Re().root,s,(n={},(0,ee.Z)(n,Re().disabled,l),(0,ee.Z)(n,Re().checked,a),n)),onClick:o,ref:t},r.createElement("div",{className:Re().header,ref:u},r.createElement("div",{className:Re().design}),r.createElement("div",{className:Re().text},i)),c&&a&&r.createElement(M.Z,{open:!0},r.createElement("div",{className:Re().content},c())))},Be=(0,r.forwardRef)(Ie),We=n(9502),Me=n.n(We),De=n(9089),Te=["renderContent"],Ge=function e(t){var n=t.options,a=void 0===n?[]:n,o=t.value,l=t.onChange,i=t.renderChildrenContent;return r.createElement("div",{className:Me().root},a.map((function(t){var n=t.options,a=!(null==n||!n.length),c=(0,r.useState)(null),s=(0,v.Z)(c,2),u=s[0],d=s[1],m=(0,r.useState)(!1),p=(0,v.Z)(m,2),f=p[0],g=p[1],C=a&&o&&n.find((function(e){return e.value===o}))||t,y=r.createElement(Be,{headerRef:d,className:Me().item,key:null==C?void 0:C.value,checked:!(null!=C&&C.disabled)&&(null==C?void 0:C.value)===o,onChange:function(){null!=C&&C.disabled||(a?g(!f):null!=C&&C.value&&(null==l||l(C.value)))},label:null==C?void 0:C.label,disabled:null==C?void 0:C.disabled,renderContent:null==C?void 0:C.renderContent});return null!=C&&C.disabled&&null!=C&&C.disabledReason?r.createElement(ve.Z,{key:null==C?void 0:C.value,wrapperClasses:Me().wrapper,title:null==C?void 0:C.disabledReason},y):r.createElement(r.Fragment,null,r.createElement("div",{key:null==C?void 0:C.value,className:Me().wrapper},y,n&&r.createElement("div",{className:Me().childrenIndicator},r.createElement(A.ZP,{size:"24px",icon:A.Tu.Dropdown}))),n&&r.createElement(De.a,{onClose:function(){return g(!1)},className:Me().overlay,hideStyles:!0,containerClassName:"u-w-100",open:f,followElement:u||void 0,offset:[0,0],placement:"top-start"},r.createElement(e,{options:n.map((function(e){e.renderContent;var t=(0,X.Z)(e,Te);return i?e:t})),onChange:function(e){null==l||l(e),g(!1)},value:o})))})))},Oe=n(9111),Ue=n(1291),qe=function(e){var t,n=e.isCurrent,a=e.isDefault,o=e.style,l=(0,T.WP)().hotel,i=(null!==(t=null==l?void 0:l.paymentCardTypes)&&void 0!==t?t:[]).map((function(e){return Oe.w[e]?{name:Oe.w[e],status:!1}:null})).filter((function(e){return e}));return r.createElement("div",{className:"u-flex flex-row justify-content-start"},Object.keys(i).map((function(e){var t,l;return r.createElement("div",{key:e,id:null===(t=i[e])||void 0===t?void 0:t.name,className:E()("cc-icon u-flex u-marg-right--light",{"-current":null==n?void 0:n(e),"-default":null==a?void 0:a(e)}),style:Object.assign({backgroundImage:"url('".concat(ge.Z.getAssetUrl()+"assets/img/"+(null===(l=i[e])||void 0===l?void 0:l.name)+".png","')"),backgroundSize:"contain"},o||{})})})))},Fe=(0,r.forwardRef)((function(e,t){var n,a=(0,T.WP)().hotel,o=(0,r.useState)({}),l=(0,v.Z)(o,2),i=l[0],c=l[1],s=(0,f.$)().t,d=(0,T.b)().focusElement,m={fontSize:"13px",lineHeight:"18px","&::placeholder":{color:"#8B8F9A",opacity:1}},p=(0,Ue.c)([{label:s(u.W.Step.Confirmation.Inputs.CardNumber),name:"credit-card",type:"card-number",vgsProps:{autoComplete:["cc-number"],successColor:"#4F8A10",errorColor:"#D8000C",showCardIcon:!1,placeholder:s(u.W.Step.Confirmation.Inputs.CardNumber)+" *",validations:["required","validCardNumber"],css:m}},{label:s(u.W.Step.Confirmation.Inputs.NameOnCard),name:"card-name",type:"text",vgsProps:{validations:["required"],css:m,placeholder:s(u.W.Step.Confirmation.Inputs.NameOnCard)+" *"}},{label:s(u.W.Step.Confirmation.Inputs.CardExpiry),name:"expiration-date",type:"card-expiration-date",vgsProps:{placeholder:s(u.W.Step.Confirmation.Inputs.CardExpiry)+" *",validations:["required","validCardExpirationDate"],css:m}},{label:s(u.W.Step.Confirmation.Inputs.SecurityCode),name:"security-code",type:"card-security-code",vgsProps:{placeholder:s(u.W.Step.Confirmation.Inputs.SecurityCode)+" *",validations:["required","validCardSecurityCode"],css:m}}]),g=(0,v.Z)(p.fields,4),y=g[0],h=g[1],E=g[2],b=g[3],_=p.vgsForm,x=function(e){var t={};Object.keys(e).forEach((function(n){var r="";switch(n){case"credit-card":r=s(u.W.Step.Confirmation.Inputs.CardNumber);break;case"expiration-date":r=s(u.W.Step.Confirmation.Inputs.CardExpiry);break;case"security-code":r=s(u.W.Step.Confirmation.Inputs.SecurityCode);break;default:r=s(u.W.Step.Confirmation.Inputs.NameOnCard)}t[n]=r+" "+e[n].errorMessages[e[n].errorMessages.length-1]})),c(t)};(0,r.useEffect)((function(){var e,t;i&&0!==Object.keys(i).length&&null!=y&&null!==(e=y.ref)&&void 0!==e&&e.current&&d(null==y||null===(t=y.ref)||void 0===t?void 0:t.current)}),[i]),(0,r.useImperativeHandle)(t,(function(){return{getTokenizedCode:function(){return new Promise((function(e,t){_?_.submit("/post",{serializer:"deep",methods:"POST"},(function(n,r){var a=JSON.parse(r.data),o=a["expiration-date"].match(/^(\d+)\s*\/\s*(\d+)$/);if(!o||o[1].length>2||4!==o[2].length&&2!==o[2].length)return x({"expiration-date":{errorMessages:[s(u.W.Step.Confirmation.InputErrors.CardExpiry.Invalid)]}}),void t(s(u.W.Step.Confirmation.InputErrors.CardExpiry.Invalid));var l=(1===o[1].length?"0":"")+o[1]+(2===o[2].length?o[2]:o[2].substr(2)),i={CVV:a["security-code"],Expiry:l,Name:a["card-name"],Number:a["credit-card"],Type:y.state.cardType};e(i)}),(function(e){x(e),t(e)})):console.error("VGS not on element, problem has occurred")}))}}}));var k=(0,r.useRef)(null),Z=(null!==(n=null==a?void 0:a.paymentCardTypes)&&void 0!==n?n:[]).map((function(e){return Oe.w[e]?{name:Oe.w[e],status:!1}:null})).filter((function(e){return e}));return r.createElement("div",null,["credit-card","card-name","expiration-date","security-code"].map((function(e){var t=i[e];return r.createElement(M.Z,{open:!!t,key:e},r.createElement("div",{className:"u-flex"},r.createElement(O.ZP,{type:O.NK.Danger,icon:A.Tu.Error},r.createElement(C.ZP,{type:C.yG.Small},t))))})),r.createElement("div",{className:"u-marg-bottom"},r.createElement(qe,{isCurrent:function(e){var t;return null!==y.state.cardType&&(null===(t=Z[e])||void 0===t?void 0:t.name)===y.state.cardType},isDefault:function(e){return null===y.state.cardType}})),r.createElement("form",{ref:k},r.createElement(te.Z,{dimensions:"2/2"},r.createElement("div",{className:y.getClasses(),ref:y.ref}),r.createElement(te.Z,{dimensions:"2/2"},r.createElement("div",{className:E.getClasses(),ref:E.ref}),r.createElement("div",{className:b.getClasses(),ref:b.ref}))),r.createElement(te.Z,{dimensions:"1"},r.createElement("div",{className:h.getClasses(),ref:h.ref}))))})),Le=n(3423),ze=n(9747),je=n(514),Qe=function(){return r.createElement("div",null,r.createElement("div",{className:"row no-gutters"},r.createElement("div",{className:"col-md-4"},r.createElement("div",{className:"d-flex justify-content-center"},r.createElement(ze.Z,{type:"text",w:"md",h:"sm",blink:!0})),r.createElement(ze.Z,{type:"text",h:"md",blink:!0}),r.createElement(ze.Z,{type:"text",h:"md",blink:!0})),r.createElement("div",{className:"col-md-4"},r.createElement("div",{className:"d-flex justify-content-center"},r.createElement(ze.Z,{type:"text",w:"md",h:"sm",blink:!0})),r.createElement(ze.Z,{type:"text",h:"sm",blink:!0}),r.createElement(ze.Z,{type:"text",h:"sm",blink:!0}),r.createElement(ze.Z,{type:"text",h:"sm",blink:!0})),r.createElement("div",{className:"col-md-4"},r.createElement("div",{className:"d-flex justify-content-center"},r.createElement(ze.Z,{type:"text",w:"md",h:"sm",blink:!0})),r.createElement("div",{className:"d-flex justify-content-center u-marg-top u-marg-bottom"},r.createElement(ze.Z,{type:"text",w:"xs",h:"sm",blink:!0,noMarg:!0})),r.createElement("div",{className:"d-flex justify-content-center"},r.createElement(ze.Z,{type:"text",w:"md",h:"sm",blink:!0,noMarg:!0})),r.createElement("div",{className:"d-flex justify-content-center u-marg-top u-marg-bottom"},r.createElement(ze.Z,{type:"text",w:"xs",h:"sm",blink:!0,noMarg:!0})))),r.createElement("div",{className:"row no-gutters"},r.createElement("div",{className:"col-md-4"},r.createElement(ze.Z,{type:"text",h:"lg",blink:!0})),r.createElement("div",{className:"offset-md-4 col-md-4 d-flex align-items-center"},r.createElement(ze.Z,{type:"text",w:"xl",h:"sm",blink:!0}))))},Ve=function(){var e,t,n=(0,r.useContext)(R.hy),a=(0,je.W)().hotel,o=null===(e=n.reservationData)||void 0===e||null===(t=e.payment)||void 0===t?void 0:t.planpay;return(0,r.useLayoutEffect)((function(){null!=o&&o.id&&Le.MQ.checkout.refresh()}),[null==o?void 0:o.id]),(0,r.useEffect)((function(){var e;Le.MQ.init({environment:null==a||null===(e=a.planpay)||void 0===e?void 0:e.env})}),[a]),r.createElement(r.Fragment,null,r.createElement("div",{className:"planpay-payment-container","data-planpay-checkout-id":null==o?void 0:o.id,style:{minHeight:"204px",display:"flex",justifyContent:"flex-end",flexDirection:"column"}},r.createElement(Qe,null)))},$e=n(5729),He=n.n($e),Je=function(e){var t=e.vgsCardName,n=e.large;return r.createElement("div",{className:E()(He().root,(0,ee.Z)({},He()["--large"],n)),style:{backgroundImage:"url('".concat(ge.Z.getImageAssetUrl()+t+".png","')")}})},Ye=n(9605),Ke=n(5498),Xe=n.n(Ke),et=function(e){var t,n=e.card,a=(e.active,(0,f.$)().t),o=(0,R.ZS)().roomstayMember;return r.createElement("div",{className:Xe().root},r.createElement("div",{className:"flex-shrink-0"},n?r.createElement(Je,{vgsCardName:n.type,large:!0}):null),r.createElement("div",null,r.createElement(C.ZP,{align:Ye.P.Left,type:C.yG.Small,color:y.Il.Navy},n?"**** **** **** ".concat(n.cardNumber.slice(-4)):a(u.W.Step.Confirmation.CardLabel)),r.createElement(C.ZP,{className:"u-marg-top--lighter",align:Ye.P.Left,type:C.yG.Caption,color:y.Il.DarkGrey},n?"Expires ".concat((t=n.expiry).slice(0,2)+" / "+t.slice(2)):a(u.W.Step.Confirmation.CardSubLabel))),!n&&r.createElement("div",null,r.createElement(qe,{style:{width:24,height:16,borderRadius:1.5,border:"0.5px solid #DFE1E5"},isCurrent:function(){return!0}})),(null==o?void 0:o.defaultCard)&&n&&n.cardId===o.defaultCard&&r.createElement(Ce.ZP,{size:"small",type:Ce.Rm.Primary},"DEFAULT CARD"))};function tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(n),!0).forEach((function(t){(0,ee.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var at=function(e){var t,n,a=e.tokenizerRef,o=e.onChangeCb,l=(0,f.$)().t,i=(0,K.Gc)(),c=(0,T.WP)().hotel,s=(0,R.Kc)(),d=(0,R.ZS)(),m=d.cards,p=void 0===m?[]:m,g=d.roomstayMember,v=(0,r.useMemo)((function(){return p.find((function(e){return e.cardId===(null==g?void 0:g.defaultCard)}))}),[p,g]),h=i.watch("paymentMethod"),E={value:se.EBookingPaymentMethod.Card,label:r.createElement(et,{active:h===se.EBookingPaymentMethod.Card}),renderContent:function(){return r.createElement(Fe,{ref:a})}},b=[];if(null!=c&&c.paymentMethods.includes(se.EBookingPaymentMethod.Card)){var _;if(p.length){var x=v||p[0];_={value:x.cardId,label:r.createElement(et,{card:x})}}else _=E;var k=[];if(p.length){var Z,P=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){i=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(i)throw o}}}}(p);try{for(P.s();!(Z=P.n()).done;){var S=Z.value;k.push({value:S.cardId,label:r.createElement(et,{card:S})})}}catch(e){P.e(e)}finally{P.f()}k.push(E)}b.push(nt(nt({},_),{},{options:k.length>0?k:void 0}))}return null!=c&&c.paymentMethods.includes(se.EBookingPaymentMethod.Planpay)&&null!=c&&null!==(t=c.planpay)&&void 0!==t&&t.minDaysShowPlanpay&&q()(s.startDate).diff(q()(),"day")>(null==c||null===(n=c.planpay)||void 0===n?void 0:n.minDaysShowPlanpay)&&b.push({value:se.EBookingPaymentMethod.Planpay,label:r.createElement("div",{className:"u-flex u-flex-align-center"},r.createElement("div",null,l(u.W.Step.Confirmation.PlanpayLabel)),r.createElement("div",{className:"u-flex u-flex-align-center u-marg-left--light",style:{borderRadius:"24px",overflow:"hidden"}},r.createElement("img",{height:16,src:ge.Z.getImageAssetUrl("planpay-logo-small.svg"),alt:""})),!i.formState.isValid&&r.createElement(C.ZP,{color:y.Il.Graphite,className:"u-flex u-flex-align-center",style:{color:"#313131",fontSize:10}},r.createElement(A.ZP,{color:y.Il.DarkGrey,icon:A.Tu.Info,className:"u-marg-right--lighter u-marg-left--light"}),l(u.W.Step.Confirmation.PlanpayHelperText))),disabled:!i.formState.isValid,disabledReason:i.formState.isValid?"":"You must fill all the above details before proceeding with Planpay",renderContent:function(){return r.createElement(Ve,null)}}),r.createElement(K.Qr,{control:i.control,name:"paymentMethod",render:function(e){var t=e.field,n=t.onChange,a=t.value;return r.createElement(r.Fragment,null,r.createElement("div",null,r.createElement(Ge,{options:b,value:a,onChange:function(e){n(e),o(e)}})))}})},ot=n(2566),lt=n(2710);function it(){var e=(0,r.useState)({differences:[],warnings:[]}),t=(0,v.Z)(e,2),n=t[0],o=t[1],l=(0,r.useContext)(R.gr),i=(0,r.useState)(""),s=(0,v.Z)(i,2),d=s[0],m=s[1],p=(0,r.useState)(!1),h=(0,v.Z)(p,2),E=h[0],b=h[1],_=(0,r.useRef)(null),x=(0,r.useRef)(null),k=(0,f.$)().t,Z=we(),P=Z.queryPaymentMethod,S=Z.queryRoomstayId,N=Z.queryPlanpayCheckoutId,I=(0,R.dF)(),B=(0,K.Gc)(),W=Pe(),M=W.isBackFromPlanpay,T=W.isLoading,G=W.apiErrors,U=W.clearApiErrors,q=W.book,F=W.rollbackReservation,L=W.commitReservation,z=(0,R.Kc)(),j=(0,r.useRef)(null),Q=(0,ot.J)(),V=(0,R.ZS)().roomstayMember,$=function(){var e=(0,H.Z)(Y().mark((function e(t){var n,r,a,o;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next=e.t0===se.EBookingPaymentMethod.Planpay?3:e.t0===se.EBookingPaymentMethod.Card?10:(e.t0,se.EBookingPaymentMethod.SavedCard,16);break;case 3:return(r=new URLSearchParams(window.location.search)).set("roomstayId","{{rsId}}"),r.set("session",I.sessionProvider.getCurrentSessionID().toString()),r.set("paymentMethod",se.EBookingPaymentMethod.Planpay),a="".concat(window.location.origin).concat(window.location.pathname).concat(window.location.search,"#/step/confirmation/?").concat(r),n={Method:se.EBookingPaymentMethod.Planpay,PlanpayCheckoutId:N||void 0,RedirectUrl:a},e.abrupt("break",17);case 10:return e.t1=se.EBookingPaymentMethod.Card,e.next=13,null===(o=j.current)||void 0===o?void 0:o.getTokenizedCode();case 13:return e.t2=e.sent,n={Method:e.t1,PaymentCard:e.t2},e.abrupt("break",17);case 16:n={Method:se.EBookingPaymentMethod.SavedCard,SavedCardID:t};case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){var e,t,n="";return n=Object.values(se.EBookingPaymentMethod).includes(P)?P:null!=V&&V.defaultCard&&null!=V&&null!==(e=V.cards)&&void 0!==e&&e.find((function(e){return e.cardId===(null==V?void 0:V.defaultCard)}))?null==V?void 0:V.defaultCard:se.EBookingPaymentMethod.Card,B.setValue("paymentMethod",n),oe(n),M&&(S===(null===(t=z.reservationData)||void 0===t?void 0:t.roomstayId)?J():null==F||F()),function(){M||null==F||F()}}),[]);var J=function(){var e=(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==L?void 0:L(z.reservationData);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=B.watch("paymentMethod");I.engine.getSessionProvider().getSession().then((function(e){m(e.source)}));var ee=function(){var e=(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Q(_e.Z.getStepUrl());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae(X,function(){var e=(0,H.Z)(Y().mark((function e(t){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null==L?void 0:L(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:return e.abrupt("return",!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(e){var t=null==l?void 0:l.errorChecks.every((function(t){return t().validate(e)}));return void 0===t||t},ae=function(){var e=(0,H.Z)(Y().mark((function e(t,n){var r;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==q?void 0:q((0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$(t));case 1:case"end":return e.stop()}}),e)}))),null===(r=x.current)||void 0===r?void 0:r.value,(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=void 0,!xe.Z.isActive()||null!=_&&null!==(n=_.current)&&void 0!==n&&n.checked){e.next=3;break}return b(!0),e.abrupt("return",!1);case 3:if(re(!0)){e.next=5;break}return e.abrupt("return",!1);case 5:if(e.prev=5,t!==se.EBookingPaymentMethod.Card){e.next=9;break}return e.next=9,j.current.getTokenizedCode();case 9:return e.abrupt("return",!0);case 12:return e.prev=12,e.t0=e.catch(5),e.abrupt("return",!1);case 15:case"end":return e.stop()}var n}),e,null,[[5,12]])}))),(function(e){e&&o(e)}),n);case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),oe=function(){var e=(0,H.Z)(Y().mark((function e(t){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t===se.EBookingPaymentMethod.Planpay){e.next=3;break}return e.next=3,null==F?void 0:F();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.createElement("form",null,M?r.createElement(D.Z,null):r.createElement(r.Fragment,null,r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(a.Z,{bold:!0},k(u.W.Step.Confirmation.GuestDetails))),r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.Success},r.createElement("strong",null,k(u.W.Step.Confirmation.AlmostDone,{required:"*"})))),r.createElement(me,null),"inline"===d?r.createElement(O.ZP,{type:O.NK.Accent2,heavyPadding:!0},r.createElement("div",{className:"u-flex u-w-100 flex-wrap flex-xl-nowrap"},r.createElement("div",null,r.createElement(C.ZP,{color:y.Il.Accent,bold:!0},k(u.W.Step.Confirmation.WantMoreRooms)),r.createElement(C.ZP,{color:y.Il.Navy},k(u.W.Step.Confirmation.YouCanAddAndEditRooms))),r.createElement("div",{className:"d-flex align-items-center u-marg-top@xl-"},r.createElement(w.Z,{filled:!0,primary:!0,icon:A.Tu.Add,iconPosition:"left",onClick:ee},k(u.W.Step.Confirmation.AddMoreRooms))))):r.createElement(r.Fragment,null),ke.Z.isActive()&&r.createElement(r.Fragment,null,r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},"Travel Agent")),r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,k(u.W.Step.Confirmation.Inputs.IATANumber)))),r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Small},k(u.W.Step.Confirmation.Inputs.IATANumberGuide))),r.createElement(ne.Z,(0,g.Z)({placeholder:k(u.W.Step.Confirmation.Inputs.IATANumber),wide:!0},B.register("IATANumber")))),r.createElement(c.Z,null)),r.createElement(lt.h,{inputRef:x}),r.createElement(c.Z,null),r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},k(u.W.Navigation.Menu.PaymentInformation))),r.createElement(at,{tokenizerRef:j,onChangeCb:function(){var e=(0,H.Z)(Y().mark((function e(t){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe(t);case 2:if(t!==se.EBookingPaymentMethod.Planpay){e.next=5;break}return e.next=5,ae(t);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),r.createElement("div",{className:"u-marg-top u-flex align-items-center"},r.createElement("div",{className:"u-flex align-items-center justify-content-start"},r.createElement(A.ZP,{icon:A.Tu.Lock,color:y.Il.Success}),r.createElement("div",{className:"u-marg-left--light"},r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.Success},r.createElement("strong",null,k(u.W.Step.Confirmation.Secured))))),r.createElement(Ae,null))),r.createElement(c.Z,null),r.createElement(pe,null),r.createElement("div",{className:"u-pad-top--light u-marg-bottom"},r.createElement(Ee,null)),xe.Z.isActive()&&r.createElement(r.Fragment,null,r.createElement(c.Z,null),r.createElement("div",null,r.createElement(be,{ref:_,confirmationPolicyError:E}))),r.createElement("div",{className:"u-flex u-marg-top--heavy justify-content-end"},r.createElement(fe.Z,{disabled:X===se.EBookingPaymentMethod.Planpay||T,text:k(u.W.Step.Confirmation.ConfirmReservation),isLoading:T,onClick:te}))),r.createElement(he.default,{open:!!G,onClose:U},r.createElement(C.ZP,null,G)),r.createElement(ye,{differences:n.differences,warnings:n.warnings,isLoading:T,onClose:(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==F?void 0:F();case 2:Q(_e.Z.getStepUrl());case 3:case"end":return e.stop()}}),e)}))),onProceed:(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(X!==se.EBookingPaymentMethod.Planpay){e.next=4;break}o({differences:[],warnings:[]}),e.next=6;break;case 4:return e.next=6,null==L?void 0:L(z.reservationData);case 6:case"end":return e.stop()}}),e)})))}))}var ct=n(9666),st=n(3819),ut=Ze.Provider,dt=function(e){var t=e.children,n=we(),a=n.queryPaymentMethod,o=n.queryRoomstayId,l=n.queryPlanpayCheckoutId,i=(0,r.useState)(!1),c=(0,v.Z)(i,2),s=c[0],d=c[1],m=(0,r.useState)(""),p=(0,v.Z)(m,2),g=p[0],A=p[1],C=(0,K.cI)({mode:"onChange"}),y=(0,r.useContext)(R.hy),h=y.getAllValidRows(),E=y.basketAddonRows,b=(0,T.WP)().hotel,_=(0,f.$)().t,x=function(e){return e.userProfiles.map((function(e){return{FirstName:e.Forename,LastName:e.Surname,Phone:e.Phone.replace(" ",""),Email:e.Email,Address:{Line1:e.Address,City:e.City,PostalCode:e.PostCode,Country:e.Country},MarketingOptIn:!1}}))},k=function(){var e=(0,H.Z)(Y().mark((function e(t){var n;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=[],!t.reservations){e.next=5;break}t.reservations.forEach((function(e,t){var r=y.currentBasketRows[t].checkDiffFromReservation(e);r&&n.push(r)})),e.next=7;break;case 5:throw ct.n_({level:st.z.Error,message:"No reservation data: "+JSON.stringify(t)}),new Error("The reservation could not be completed due to an unexpected issue, please try again");case 7:if(!(n.length||t.warnings&&t.warnings.length)){e.next=9;break}return e.abrupt("return",{differences:n,warnings:t.warnings});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Z=function(e,t,n,r,a){return function(){var o=(0,H.Z)(Y().mark((function o(l){var i,c,s,m;return Y().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(L.ZP.instance.sendInteraction("Complete Booking",L.s_.BUTTON,L._J.GUEST_DETAILS),d(!0),o.t0=!n,o.t0){o.next=7;break}return o.next=6,n();case 6:o.t0=o.sent;case 7:if(o.t0){o.next=11;break}return d(!1),o.abrupt("return");case 11:return o.next=13,e();case 13:return c=o.sent,o.prev=14,o.next=17,W.Z.Reservation.bookNow(h,x(l),c,E,t||"",null==b?void 0:b.hotelID);case 17:return i=o.sent,y.booked(i),o.next=21,k(i);case 21:if(!(s=o.sent)){o.next=27;break}d(!1),null==r||r(s),o.next=29;break;case 27:return o.next=29,null==a?void 0:a(i);case 29:o.next=35;break;case 31:o.prev=31,o.t1=o.catch(14),console.log(o.t1),A(null!==(m=null===o.t1||void 0===o.t1?void 0:o.t1.Message)&&void 0!==m?m:_(u.W.Step.Confirmation.UnexpectedErrorFromBookingDatabase));case 35:return o.prev=35,d(!1),o.finish(35);case 38:case"end":return o.stop()}}),o,null,[[14,31,35,38]])})));return function(e){return o.apply(this,arguments)}}()},P=!!l&&!!o&&!!a,S=function(e){var t;return null==e||null===(t=e.reservations)||void 0===t?void 0:t.map((function(e){return e.reservationNumber}))},w=function(){var e=(0,H.Z)(Y().mark((function e(t){var n,r;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,d(!0),!t){e.next=18;break}if(!(n=S(t)).length){e.next=15;break}return e.prev=5,e.next=8,W.Z.Reservation.commit(n,t.itineraryNumber,null==b?void 0:b.hotelID,l||void 0).then((function(e){try{L.ZP.instance.sendReservationConfirmed(y.getAllValidRows(),y.basketAddonRows,e)}catch(e){ct.Tb("Failed to read reservations from GTM code: "+JSON.stringify(e))}y.checkedOut(e)})).catch((function(e){console.log(e),A(_(u.W.Misc.UnexpectedError))})).finally((function(){d(!1)}));case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),A(null!==(r=null===e.t0||void 0===e.t0?void 0:e.t0.Message)&&void 0!==r?r:_(u.W.Step.Confirmation.UnexpectedErrorFromBookingDatabase));case 13:e.next=18;break;case 15:A(_(u.W.Step.Confirmation.UnexpectedErrorOnCommittingReservation)),R.qL.add({message:_(u.W.Step.Confirmation.UnexpectedErrorOnCommittingReservation)}),ct.Tb("No reservation IDs found when attempting to commit: "+JSON.stringify(t));case 18:e.next=26;break;case 20:e.prev=20,e.t1=e.catch(0),A(_(u.W.Step.Confirmation.FailedToCommitReservation)),console.log("Failed to commit reservation "),console.error(e.t1),ct.Tb(e.t1);case 26:case"end":return e.stop()}}),e,null,[[0,20],[5,10]])})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=(0,H.Z)(Y().mark((function e(){var t;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y.reservationData){e.next=2;break}return e.abrupt("return");case 2:if(e.prev=2,!(t=S(y.reservationData)).length){e.next=10;break}return d(!0),e.next=8,W.Z.Reservation.rollback(t,y.reservationData.itineraryNumber,null==b?void 0:b.hotelID);case 8:e.next=11;break;case 10:ct.Tb("No reservation IDs found when attempting to rollback: "+JSON.stringify(y.reservationData));case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(2),console.log("Failed to rollback reservations"),ct.Tb(e.t0);case 17:return e.prev=17,y.rollback(),d(!1),e.finish(17);case 21:case"end":return e.stop()}}),e,null,[[2,13,17,21]])})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=(0,H.Z)(Y().mark((function e(t,n,r,a,o){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C.handleSubmit(Z(t,n,r,a,o))();case 2:case"end":return e.stop()}}),e)})));return function(t,n,r,a,o){return e.apply(this,arguments)}}();return r.createElement(K.RV,C,r.createElement(ut,{value:{book:I,commitReservation:w,rollbackReservation:N,isLoading:s,apiErrors:g,clearApiErrors:function(){return A("")},isBackFromPlanpay:P}},t))};function mt(){return r.createElement(dt,null,r.createElement(it,null))}var pt=n(6409),ft=function(){var e=(0,r.useContext)(R.g7),t=(0,r.useContext)(R.aN).currentStep,n=(0,r.useContext)(R.hy).currentBasketRows,g=(0,f.$)().t,v=(0,V.z)().raise;return(0,r.useEffect)((function(){var e=new $.z(n);v(e)}),[]),r.createElement("div",{className:"container"},r.createElement(d.default,null),r.createElement(pt.i5,null,r.createElement(pt.mV,null,e.screenSize>m.Z.Medium&&r.createElement(r.Fragment,null,r.createElement(i.rU,{to:o.Z.getPreviousStepUrl(t)},r.createElement(s.Z,null)),r.createElement("div",{className:"u-marg-top--light u-marg-bottom--heavy"},r.createElement(a.Z,{bold:!0},g(u.W.Navigation.Steps.Confirmation)))),r.createElement("div",{className:"u-marg-top@m-"},r.createElement(j.Z,null))),e.screenSize>m.Z.Medium&&r.createElement(pt.f,null,r.createElement(p.Z,null))),r.createElement(c.Z,null),r.createElement(pt.i5,null,r.createElement(pt.mV,null,r.createElement("div",{className:"block-container"},!Q.Z.isActive()&&r.createElement(G,null),r.createElement(R.s$,null,r.createElement(mt,null)))),e.screenSize>m.Z.Medium&&r.createElement(pt.f,null,r.createElement(z,{endDate:q()().add(10,"minute")}),r.createElement(l.v,{showImages:!0}))))}},2899:function(e,t,n){(t=n(3645)(!0)).push([e.id,".InlinePaymentCard-module__root___3JISW{width:24px;height:16px;background-size:contain;background-repeat:no-repeat;border-radius:2.5px;border:.5px solid #dfe1e5}.InlinePaymentCard-module__root___3JISW.InlinePaymentCard-module__--large____T4UH{width:48px;height:32px}","",{version:3,sources:["InlinePaymentCard.module.scss"],names:[],mappings:"AAAA,wCAAM,UAAU,CAAC,WAAW,CAAC,uBAAuB,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,yBAAyB,CAAC,kFAAc,UAAU,CAAC,WAAW",file:"InlinePaymentCard.module.scss",sourcesContent:[".root{width:24px;height:16px;background-size:contain;background-repeat:no-repeat;border-radius:2.5px;border:.5px solid #dfe1e5}.root.--large{width:48px;height:32px}"]}]),t.locals={root:"InlinePaymentCard-module__root___3JISW","--large":"InlinePaymentCard-module__--large____T4UH"},e.exports=t},4319:function(e,t,n){(t=n(3645)(!0)).push([e.id,".InlinePaymentOption-module__root___qRPN1{display:flex;align-items:center;gap:12px;margin-left:4px}","",{version:3,sources:["InlinePaymentOption.module.scss"],names:[],mappings:"AAAA,0CAAM,YAAY,CAAC,kBAAkB,CAAC,QAAQ,CAAC,eAAe",file:"InlinePaymentOption.module.scss",sourcesContent:[".root{display:flex;align-items:center;gap:12px;margin-left:4px}"]}]),t.locals={root:"InlinePaymentOption-module__root___qRPN1"},e.exports=t},987:function(e,t,n){(t=n(3645)(!0)).push([e.id,'.roomstay-booking-container .RadioButton-module__root___1w9es{width:100%;display:block;border:1px solid var(--rs-color-light-grey);border-radius:8px;margin:10px 0;cursor:pointer;transition:.3s}.roomstay-booking-container .RadioButton-module__root___1w9es+.RadioButton-module__root___1w9es{margin-top:8px}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__disabled___1HXUO{background:#f6f6fa;cursor:not-allowed}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__disabled___1HXUO .RadioButton-module__design___3kmtW{border:solid 1px #dfe1e5;background:rgba(0,0,0,0)}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__disabled___1HXUO .RadioButton-module__design___3kmtW::before{background:rgba(0,0,0,0)}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__disabled___1HXUO .RadioButton-module__text___1CCxU{color:#c0c3cc}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__checked___XmNJ8 .RadioButton-module__design___3kmtW{background:var(--rs-color-accent-2);border:solid 1px var(--rs-color-accent-1)}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__checked___XmNJ8 .RadioButton-module__design___3kmtW::before{transform:translate(-50%, -50%) scale(1);background:var(--rs-color-accent-1)}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__checked___XmNJ8 .RadioButton-module__text___1CCxU{color:var(--rs-color-navy)}.roomstay-booking-container .RadioButton-module__input___3WTPl{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;z-index:-1}.roomstay-booking-container .RadioButton-module__design___3kmtW{flex-shrink:0;width:16px;height:16px;border-radius:100px;position:relative;border:solid 1px var(--rs-color-light-grey)}.roomstay-booking-container .RadioButton-module__design___3kmtW::before{content:"";width:10px;height:10px;display:inline-block;border-radius:inherit;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0,0,0,0);transition:.3s;position:absolute}.roomstay-booking-container .RadioButton-module__text___1CCxU{color:var(--rs-color-navy);font-size:14px;font-weight:400;line-height:18px;margin-left:8px;transition:.3s}.roomstay-booking-container .RadioButton-module__content___2b4U9{display:block;padding:16px;border-top:solid 1px var(--rs-color-light-grey)}.roomstay-booking-container .RadioButton-module__header___2nA7I{padding:8px 16px;display:flex;align-items:center}.roomstay-booking-container .RadioButton-module__header___2nA7I:hover{background:rgba(204,204,204,.14)}',"",{version:3,sources:["RadioButton.module.scss"],names:[],mappings:"AAAA,8DAA2C,UAAU,CAAC,aAAa,CAAC,2CAA2C,CAAC,iBAAiB,CAAC,aAAa,CAAC,cAAc,CAAC,cAAc,CAAC,gGAAiD,cAAc,CAAC,mGAAoD,kBAAkB,CAAC,kBAAkB,CAAC,uIAA4D,wBAAwB,CAAC,wBAAwB,CAAC,+IAAoE,wBAAwB,CAAC,qIAA0D,aAAa,CAAC,sIAA2D,mCAAmC,CAAC,yCAAyC,CAAC,8IAAmE,wCAAwC,CAAC,mCAAmC,CAAC,oIAAyD,0BAA0B,CAAC,+DAA4C,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,gEAA6C,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,2CAA2C,CAAC,wEAAqD,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAAC,wBAAwB,CAAC,cAAc,CAAC,iBAAiB,CAAC,8DAA2C,0BAA0B,CAAC,cAAc,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,cAAc,CAAC,iEAA8C,aAAa,CAAC,YAAY,CAAC,+CAA+C,CAAC,gEAA6C,gBAAgB,CAAC,YAAY,CAAC,kBAAkB,CAAC,sEAAmD,gCAAgC",file:"RadioButton.module.scss",sourcesContent:[':global(.roomstay-booking-container) .root{width:100%;display:block;border:1px solid var(--rs-color-light-grey);border-radius:8px;margin:10px 0;cursor:pointer;transition:.3s}:global(.roomstay-booking-container) .root+.root{margin-top:8px}:global(.roomstay-booking-container) .root.disabled{background:#f6f6fa;cursor:not-allowed}:global(.roomstay-booking-container) .root.disabled .design{border:solid 1px #dfe1e5;background:rgba(0,0,0,0)}:global(.roomstay-booking-container) .root.disabled .design::before{background:rgba(0,0,0,0)}:global(.roomstay-booking-container) .root.disabled .text{color:#c0c3cc}:global(.roomstay-booking-container) .root.checked .design{background:var(--rs-color-accent-2);border:solid 1px var(--rs-color-accent-1)}:global(.roomstay-booking-container) .root.checked .design::before{transform:translate(-50%, -50%) scale(1);background:var(--rs-color-accent-1)}:global(.roomstay-booking-container) .root.checked .text{color:var(--rs-color-navy)}:global(.roomstay-booking-container) .input{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;z-index:-1}:global(.roomstay-booking-container) .design{flex-shrink:0;width:16px;height:16px;border-radius:100px;position:relative;border:solid 1px var(--rs-color-light-grey)}:global(.roomstay-booking-container) .design::before{content:"";width:10px;height:10px;display:inline-block;border-radius:inherit;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0,0,0,0);transition:.3s;position:absolute}:global(.roomstay-booking-container) .text{color:var(--rs-color-navy);font-size:14px;font-weight:400;line-height:18px;margin-left:8px;transition:.3s}:global(.roomstay-booking-container) .content{display:block;padding:16px;border-top:solid 1px var(--rs-color-light-grey)}:global(.roomstay-booking-container) .header{padding:8px 16px;display:flex;align-items:center}:global(.roomstay-booking-container) .header:hover{background:rgba(204,204,204,.14)}']}]),t.locals={root:"RadioButton-module__root___1w9es",disabled:"RadioButton-module__disabled___1HXUO",design:"RadioButton-module__design___3kmtW",text:"RadioButton-module__text___1CCxU",checked:"RadioButton-module__checked___XmNJ8",input:"RadioButton-module__input___3WTPl",content:"RadioButton-module__content___2b4U9",header:"RadioButton-module__header___2nA7I"},e.exports=t},5205:function(e,t,n){(t=n(3645)(!0)).push([e.id,".RadioButtonGroup-module__root___3QZUp{position:relative}.RadioButtonGroup-module__root___3QZUp .RadioButtonGroup-module__wrapper___3_Rg6{position:relative}.RadioButtonGroup-module__root___3QZUp .RadioButtonGroup-module__wrapper___3_Rg6:first-child .RadioButtonGroup-module__item___3rGSy{border-top-left-radius:5px !important;border-top-right-radius:5px !important}.RadioButtonGroup-module__root___3QZUp .RadioButtonGroup-module__wrapper___3_Rg6:last-child .RadioButtonGroup-module__item___3rGSy{border-bottom:1px solid var(--rs-color-light-grey) !important;border-bottom-left-radius:5px !important;border-bottom-right-radius:5px !important}.RadioButtonGroup-module__root___3QZUp .RadioButtonGroup-module__item___3rGSy{border-radius:0 !important;margin-top:0 !important;margin-bottom:0 !important;border-bottom:0 !important}.RadioButtonGroup-module__overlay___p2ip9{background-color:#fff;box-shadow:0px 8px 24px rgba(0,0,0,.25);border:1px solid #dfe1e5;border-radius:5px}.RadioButtonGroup-module__childrenIndicator___16sSu{position:absolute;right:16px;top:16px;pointer-events:none}","",{version:3,sources:["RadioButtonGroup.module.scss"],names:[],mappings:"AAAA,uCAAM,iBAAiB,CAAC,iFAAe,iBAAiB,CAAC,oIAAiC,qCAAqC,CAAC,sCAAsC,CAAC,mIAAgC,6DAA6D,CAAC,wCAAwC,CAAC,yCAAyC,CAAC,8EAAY,0BAA0B,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,0BAA0B,CAAC,0CAAS,qBAAqB,CAAC,uCAAuC,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,oDAAmB,iBAAiB,CAAC,UAAU,CAAC,QAAQ,CAAC,mBAAmB",file:"RadioButtonGroup.module.scss",sourcesContent:[".root{position:relative}.root .wrapper{position:relative}.root .wrapper:first-child .item{border-top-left-radius:5px !important;border-top-right-radius:5px !important}.root .wrapper:last-child .item{border-bottom:1px solid var(--rs-color-light-grey) !important;border-bottom-left-radius:5px !important;border-bottom-right-radius:5px !important}.root .item{border-radius:0 !important;margin-top:0 !important;margin-bottom:0 !important;border-bottom:0 !important}.overlay{background-color:#fff;box-shadow:0px 8px 24px rgba(0,0,0,.25);border:1px solid #dfe1e5;border-radius:5px}.childrenIndicator{position:absolute;right:16px;top:16px;pointer-events:none}"]}]),t.locals={root:"RadioButtonGroup-module__root___3QZUp",wrapper:"RadioButtonGroup-module__wrapper___3_Rg6",item:"RadioButtonGroup-module__item___3rGSy",overlay:"RadioButtonGroup-module__overlay___p2ip9",childrenIndicator:"RadioButtonGroup-module__childrenIndicator___16sSu"},e.exports=t},5729:function(e,t,n){var r=n(3379),a=n(2899);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}},5498:function(e,t,n){var r=n(3379),a=n(4319);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}},8440:function(e,t,n){var r=n(3379),a=n(987);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}},9502:function(e,t,n){var r=n(3379),a=n(5205);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}}}]);
1
+ (("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[213],{5032:function(e,t,n){"use strict";n.d(t,{z:function(){return c}});var r=n(5671),a=n(3144),o=n(136),l=n(2963),i=n(1120);var c=function(e){(0,o.Z)(s,e);var t,n,c=(t=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,i.Z)(t);if(n){var a=(0,i.Z)(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return(0,l.Z)(this,e)});function s(e){var t;return(0,r.Z)(this,s),(t=c.call(this)).basketRows=void 0,t.basketRows=e,t}return(0,a.Z)(s,null,[{key:"getLabel",value:function(){return"View/Checkout"}}]),s}(n(7112).x)},2213:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ft}});var r=n(7294),a=n(3010),o=n(5692),l=n(3933),i=n(3727),c=n(9874),s=n(3821),u=n(9478),d=n(370),m=n(292),p=n(8279),f=n(6793),g=n(7462),v=n(885),A=n(8886),C=n(584),y=n(7754),h=n(4184),E=n.n(h),b=n(4744);function _(e){var t=e.addon,n=(0,f.$)().t;return r.createElement("div",{className:E()("additional-offers--column",{"--selected":e.selected}),style:{backgroundImage:"url('".concat(t.image&&b.Z.resizeImage(t.image,b.h.Original),"')")},onClick:function(){var t;null===(t=e.cardClicked)||void 0===t||t.call(e)}},r.createElement("div",{className:"additional-offers--column-body"},r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.White},r.createElement("strong",null,t.name)),r.createElement("div",{className:"u-flex"},r.createElement(C.ZP,{inline:!0,type:C.yG.Small,color:y.Il.White},n(u.W.Misc.SeeDetails)),r.createElement(A.ZP,{icon:A.Tu.ArrowRight,color:y.Il.White}))))}var x=n(8144),k=n(3460),Z=n(7582),P=n(5128),S=n(6380),w=n(4854),N=n(858),R=n(360),I=n(3351);function B(e){var t,n=e.addon,o=((0,f.$)().t,(0,r.useContext)(R.hy)),l=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getSelectedDate():""),i=(0,v.Z)(l,2),c=i[0],s=i[1],u=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getSelectedTime():""),d=(0,v.Z)(u,2),m=d[0],p=d[1],g=(0,r.useState)({quantity:1}),A=(0,v.Z)(g,2),h=A[0],E=A[1],_=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getQuantity():1),x=(0,v.Z)(_,2),k=x[0],Z=x[1],B=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getAdultQuantity():1),W=(0,v.Z)(B,2),M=W[0],D=W[1],T=(0,r.useState)(e.basketAddonRow?e.basketAddonRow.getChildQuantity():0),G=(0,v.Z)(T,2),O=G[0],U=G[1];return r.useEffect((function(){var t,r,a,o,l,i;if(n)return e.basketAddonRow?(E(null!==(t=n.availability[e.basketAddonRow.getSelectedDate()])&&void 0!==t?t:n.availability[n.firstDate]),s(null!==(r=e.basketAddonRow.getSelectedDate())&&void 0!==r?r:n.firstDate),p(null!==(a=e.basketAddonRow.getSelectedTime())&&void 0!==a?a:""),Z(e.basketAddonRow.getQuantity()),D(e.basketAddonRow.getAdultQuantity()),U(e.basketAddonRow.getChildQuantity())):(E(n.availability[n.firstDate]),s(n.firstDate),p((null===(o=n.availability[n.firstDate])||void 0===o||null===(l=o.selectorTimes)||void 0===l||null===(i=l[0])||void 0===i?void 0:i.value)||"")),function(){Z(1),D(1),U(0)}}),[n]),r.createElement(P.Z,{open:e.isOpen,onClose:e.onClose,size:P.g.Small,title:n?n.name:""},n&&r.createElement(r.Fragment,null,r.createElement("div",{style:{height:"350px",width:"100%",backgroundImage:'url("'.concat(n.image&&b.Z.resizeImage(n.image,b.h.Original),'")'),backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}),r.createElement("div",{className:"u-marg-heavy u-marg@m-"},r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},n.name)),r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.DarkGrey},n.description)),r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Date"),r.createElement(I.P,{nativeOnMobile:!0,options:n.selectorDates,value:c,onChange:function(e){var t,r,a,o;t=e,E(n.availability[t]),s(t),p((null===(r=n.availability[t])||void 0===r||null===(a=r.selectorTimes)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.value)||""),n.availability[t].quantity<k&&Z(n.availability[t].quantity)},keyName:"value",labelName:"text",className:"u-flex align-items-center"}))),0!==(null==h||null===(t=h.selectorTimes)||void 0===t?void 0:t.length)&&r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Time"),r.createElement(I.P,{nativeOnMobile:!0,options:(null==h?void 0:h.selectorTimes)||[],value:m,onChange:function(e){p(e)},keyName:"value",labelName:"text",className:"u-flex align-items-center"}))),h.price&&r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Quantity"),r.createElement(S.Z,{number:k,min:1,max:h.quantity,onChange:function(e){Z(e)}}))),h.adultPrice&&r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Adults"),r.createElement(S.Z,{number:M,min:0,max:h.quantity-O,onChange:function(e){D(e)}}))),h.childPrice&&r.createElement("div",{className:"row u-marg-top"},r.createElement("div",{className:"u-flex col-md-6"},r.createElement(C.ZP,null,"Children"),r.createElement(S.Z,{number:O,min:0,max:h.quantity-M,onChange:function(e){U(e)}}))),r.createElement("div",{className:"u-flex align-items-center u-marg-top"},h.price&&r.createElement("h2",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.price),"/ Qty"),h.adultPrice&&h.childPrice&&r.createElement("h2",{className:"u-marg-none"},r.createElement("div",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.adultPrice)," / Adult"),r.createElement("br",null),r.createElement("div",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.childPrice)," / Child")),h.adultPrice&&!h.childPrice&&r.createElement("h2",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.adultPrice)," / Adult"),h.childPrice&&!h.adultPrice&&r.createElement("h2",{className:"u-marg-none u-flex u-flex-align-center"},r.createElement(N.Z,null,h.childPrice)," / Child"),r.createElement(w.Z,{filled:!0,primary:!0,onClick:function(){o.setAddonQuantities(n,{quantity:k,adult:M,child:O},c,m),e.onClose()}},e.basketAddonRow?"Update Cart":"Add to Cart")),n.guaranteeDescription&&r.createElement(r.Fragment,null,r.createElement("h4",{className:"u-marg-bottom--light u-marg-top"},"Guarantee"),r.createElement("div",{className:"u-marg-bot--heavy"},r.createElement(C.ZP,{type:C.yG.Small},n.guaranteeDescription))),n.cancelPenalty&&r.createElement(r.Fragment,null,r.createElement("h4",{className:"u-marg-bottom--light u-marg-top"},"Cancellation Policy"),r.createElement("div",{className:"u-marg-bot--heavy"},r.createElement(C.ZP,{type:C.yG.Small},n.cancelPenalty))))))}var W=n(8442),M=n(9740),D=n(7832),T=n(7688);function G(){var e=(0,r.useContext)(R.hy),t=(0,r.useContext)(R.Qm),n=(0,T.WP)().hotel,o=(0,x.q_)((function(){return{x:0}})),l=(0,v.Z)(o,2),i=l[0].x,c=l[1],s=(0,k.Z)(),d=(0,v.Z)(s,2),m=d[0],p=d[1],h=(0,f.$)().t,E=r.useState([]),b=(0,v.Z)(E,2),P=b[0],S=b[1],w=(0,r.useState)(!1),N=(0,v.Z)(w,2),I=N[0],G=N[1],O=(0,r.useState)(null),U=(0,v.Z)(O,2),q=U[0],F=U[1],L=(0,r.useState)(!1),z=(0,v.Z)(L,2),j=z[0],Q=z[1],V=(0,r.useState)(0),$=(0,v.Z)(V,2),H=$[0],J=$[1],Y=(0,r.useState)(0),K=(0,v.Z)(Y,2),X=(K[0],K[1]),ee=(0,r.useState)(-1),te=(0,v.Z)(ee,2),ne=te[0],re=te[1];r.useEffect((function(){var t=!1,r=e.getAllValidRows();return Q(!0),W.Z.Addons.findAddons(r,null==n?void 0:n.hotelID).then((function(e){t||(Q(!1),S(e))})),function(){Q(!1),t=!0}}),[t.currentLanguage]);var ae=222,oe=ae*P.length>=p.width,le=(0,Z.c0)((function(e){var t=e.down,n=(0,v.Z)(e.movement,1)[0];ie(t,n)})),ie=function(e,t){if(oe)if(e)c({x:H+1.5*t});else{var n=H+t,r=(P.length-1)*ae,a=0;if(n>0)a=0,re(-1);else if(n<-(r-p.width+ae))a=-(r-p.width+ae),re(1);else{var o=-n/ae,l=n%ae>-111?Math.floor(o):Math.ceil(o);a=-l*ae,X(l),re(0)}c({x:a}),J(a)}};return r.createElement(M.Z,{open:!j&&0!==(null==P?void 0:P.length)||!(null==n||!n.showAddonLoader)},r.createElement("div",{className:"u-pad-bottom--heavy "},r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},h(u.W.Step.Confirmation.AdditionalOfferings))),j&&null!=n&&n.showAddonLoader?r.createElement(D.Z,null):0===(null==P?void 0:P.length)?r.createElement("div",null,r.createElement(C.ZP,{color:y.Il.DarkGrey},h(u.W.Step.Confirmation.NoAdditionalOfferings))):r.createElement("div",{className:"additional-offers"+(P.length>2?"":" --wide"),ref:m},oe&&r.createElement("div",{className:"additional-offers--navigation"},r.createElement(A.ZP,{icon:A.Tu.ArrowLeft2,onClick:function(){ie(!1,ae)},color:-1===ne?y.Il.DarkGrey:y.Il.White,backgroundColor:y.Il.Navy,borderRadius:"round",size:"24px"}),r.createElement(A.ZP,{icon:A.Tu.ArrowRight2,onClick:function(){ie(!1,-222)},color:1===ne?y.Il.DarkGrey:y.Il.White,backgroundColor:y.Il.Navy,borderRadius:"round",size:"24px"})),r.createElement("div",{className:"additional-offers--track-container"},r.createElement(x.q.div,(0,g.Z)({className:"additional-offers--track"},le(),{style:{left:i}}),P.map((function(t,n){return r.createElement(_,{selected:!!e.getRowForAddon(t),key:n,addon:t,cardClicked:function(){G(!0),F(t)}})}))))),r.createElement(B,{isOpen:I&&!!q,addon:q,basketAddonRow:e.getRowForAddon(q),onClose:function(){G(!1)}})))}var O=n(7933),U=n(7484),q=n.n(U);function F(e){var t=(0,r.useState)(e.endTimeDate.diff(q()(),"second")),n=(0,v.Z)(t,2),a=n[0],o=n[1];return(0,r.useEffect)((function(){var t=!1,n=setTimeout((function(){t||(a>0?o((function(e){return e-1})):(e.onEnd&&e.onEnd(),t=!0,clearTimeout(n)))}),1e3);return function(){t=!0,clearTimeout(n)}}),[a]),(0,r.useMemo)((function(){var e=[Math.floor(a/60/60),Math.floor(a/60%60),Math.floor(a%60)];return r.createElement(r.Fragment,null,e.map((function(e){return e.toString().padStart(2,"0")})).join(":"))}),[a])}var L=n(4544);function z(e){var t=(0,r.useState)(!1),n=(0,v.Z)(t,2),o=n[0],l=n[1],i=(0,f.$)().t;return r.createElement(O.ZP,{type:O.NK.Accent1},r.createElement("div",{className:"u-flex w-100 flex-wrap align-items-center"},r.createElement("div",null,r.createElement(C.ZP,null,r.createElement("strong",null,i(u.W.Step.Confirmation.YourRoomIs))),r.createElement(C.ZP,null,r.createElement("strong",null,i(u.W.Step.Confirmation.BeingHeldFor)))),r.createElement("div",{className:o?"a-flash":""},r.createElement(a.Z,{size:"large",bold:!0,color:y.Il.White},r.createElement(F,{endTimeDate:e.endDate,onEnd:function(){L.ZP.instance.sendInteraction("Countdown End Seen",L.s_.LINK,L._J.GUEST_DETAILS),l(!0)}})))))}var j=n(4511),Q=n(5400),V=n(6337),$=n(5032),H=n(5861),J=n(4687),Y=n.n(J),K=n(7536),X=n(5987),ee=n(4942),te=n(5993),ne=n(1432),re=n(5762),ae=n(3261),oe=n(6604),le=n(1248),ie=function(e){return e.Forename="Forename",e.Surname="Surname",e.Email="Email",e.Phone="Phone",e.Address="Address",e.City="City",e.PostCode="PostCode",e.Country="Country",e}({}),ce=n(9024),se=n(6598),ue=n(6431),de=["ref","onChange"],me=function(){var e=(0,K.Gc)(),t=e.register,n=e.formState,o=e.control,l=e.watch,i=e.getValues,s=e.setValue,d=(0,r.useContext)(R.hy),m=d.getAllValidRows(),p=d.basketAddonRows,h=(0,K.Dq)({control:o,name:"userProfiles"}),E=h.update,b=h.fields,_=l(["copyCheckBox","paymentMethod"]),x=(0,v.Z)(_,2),k=x[0],Z=x[1],P=n.errors,S=(0,f.$)().t,w=(0,r.useContext)(R.P0).roomstayMember;(0,r.useEffect)((function(){var e,t;null===(e=P.userProfiles)||void 0===e||null===(t=e.forEach)||void 0===t||t.call(e,(function(e,t){var n;null!==(n=P.userProfiles)&&void 0!==n&&n[t]&&(B[t]=!0)})),W(B.slice(0))}),[P.userProfiles,k]),(0,r.useEffect)((function(){var e=function(e){return 0===e&&arguments.length>1&&void 0!==arguments[1]?arguments[1]:""},t=m.map((function(t,n){var r,a,o,l,i;return i={},(0,ee.Z)(i,ie.Forename,e(n,null==w?void 0:w.forename)),(0,ee.Z)(i,ie.Surname,e(n,null==w?void 0:w.surname)),(0,ee.Z)(i,ie.Email,e(n,null==w?void 0:w.email)),(0,ee.Z)(i,ie.Phone,e(n,null==w?void 0:w.phoneNumber)),(0,ee.Z)(i,ie.Address,e(n,null==w||null===(r=w.address)||void 0===r?void 0:r.address)),(0,ee.Z)(i,ie.City,e(n,null==w||null===(a=w.address)||void 0===a?void 0:a.city)),(0,ee.Z)(i,ie.PostCode,e(n,null==w||null===(o=w.address)||void 0===o?void 0:o.zip)),(0,ee.Z)(i,ie.Country,e(n,null==w||null===(l=w.address)||void 0===l?void 0:l.country)),i}));s("userProfiles",t),s("copyCheckBox",!!(null!=m&&m.length&&m.length>1))}),[w,null==m?void 0:m.length]);var N=(0,r.useState)(m.map((function(e,t){return 0===t}))),I=(0,v.Z)(N,2),B=I[0],W=I[1],D=function(e,t){return function(e){L.ZP.instance.sendInteraction(t,L.s_.FORM_FIELD,L._J.GUEST_DETAILS)}};return(0,r.useEffect)((function(){k&&b.forEach((function(e,t){0!==t&&E(t,i("userProfiles.0"))}))}),[k]),(0,r.useEffect)((function(){var e=l((function(e,t){var n=t.name;"change"===t.type&&null!=n&&n.includes("userProfiles")&&"0"===n.split(".")[1]&&e.copyCheckBox&&b.map((function(e,t){0!==t&&E(t,i("userProfiles.0"))}))})).unsubscribe;return function(){e()}}),[b]),(0,r.useEffect)((function(){L.ZP.instance.sendCheckoutView(m,p)}),[]),r.createElement(r.Fragment,null,b.map((function(e,l){var i,s,d,p=function(e){return function(e,t){return"userProfiles.".concat(t,".").concat(e)}(e,l)},f=function(e){var t;if(P.userProfiles&&!(k&&l>=1))return null!==(t=P.userProfiles[l])&&void 0!==t&&t[e]?"error":"success"},v=m[l],h=k&&l>=1||Z===se.EBookingPaymentMethod.Planpay;return r.createElement("div",{key:e.id},r.createElement("div",{className:0===l?"":"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom",onClick:function(){0!==l&&function(e,t){B.splice(e,1,t),W(B.slice(0))}(l,!B[l])}},r.createElement("div",{className:"u-flex u-marg-bottom align-items-center"},r.createElement(a.Z,{bold:!0},S(u.W.Misc.Room)," ",l+1),0!==l&&r.createElement(A.ZP,{icon:B[l]?A.Tu.ArrowDown2:A.Tu.ArrowUp2,color:y.Il.Grey})),v&&r.createElement("div",{className:"u-marg-bottom"},r.createElement(C.ZP,null,r.createElement("strong",{className:"u-block@l-"},v.getRoom().name)," for"," ",ae.Z.pluralWithDictAndCount(v.getAdults(),u.W.Step.Date.Adult,S),", ",ae.Z.pluralWithDictAndCount(v.getChildren(),u.W.Step.Date.Child,S)),r.createElement("div",{className:"step-one-status--dates u-flex justify-content-start"},r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.Accent},r.createElement("strong",null,v.getStartDate().format("ddd, MMM D"))),r.createElement(A.ZP,{icon:A.Tu.ArrowRight2,size:"18px"}),r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.Accent},r.createElement("strong",null,v.getEndDate().format("ddd, MMM D"))))),(i=l,(d=null===(s=P.userProfiles)||void 0===s?void 0:s[i])&&n.submitCount>=1&&(0===i||!k)&&Object.values(d).map((function(e,t){return r.createElement(M.Z,{key:t,open:!0},r.createElement("div",{className:"u-flex"},r.createElement(O.ZP,{icon:A.Tu.Error,type:O.NK.Danger,noMargin:t===Object.keys(d).length-1},r.createElement(C.ZP,{type:C.yG.Small},null==e?void 0:e.message))))})),null)),r.createElement("div",{className:"room-contact-details--row",style:{maxHeight:B[l]?void 0:0}},r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,S(u.W.Step.Confirmation.ContactInfo)))),r.createElement(te.Z,{dimensions:"2/2"},r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Forename)+" *",wide:!0,required:!0,validationStatus:f(ie.Forename)},t(p(ie.Forename),{onChange:D(p(ie.Forename),"Forename - Contact Info"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Forename)})}}))),r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Surname)+" *",wide:!0,required:!0,validationStatus:f(ie.Surname)},t(p(ie.Surname),{onChange:D(p(ie.Surname),"Surname - Contact Info"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Surname)})}})))),r.createElement(te.Z,{dimensions:"2/2"},r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Email)+" *",wide:!0,validationStatus:f(ie.Email),required:!0},t(p(ie.Email),{onChange:D(p(ie.Email),"Email - Contact Info"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Email)})},pattern:{value:ue.CU,message:S(u.W.Step.Confirmation.Inputs.InvalidEmail)}}))),le.Z.isActive()?r.createElement(K.Qr,{control:o,name:p(ie.Phone),rules:{required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Phone)})},minLength:{value:5,message:"Phone number is required"},maxLength:{value:17,message:"Phone number is too long"},pattern:{value:/^[1-9]( |\d){1,15}$/g,message:"Incorrect phone number entered"}},render:function(e){var t=e.field;return r.createElement(oe.Z,(0,g.Z)({disabled:h,validationStatus:f(ie.Phone)},t,{onChange:function(e){t.onChange(e),D(p(ie.Phone),"Phone - Contact Info")(e)}}))}}):r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Phone)+" *",wide:!0,required:!0,validationStatus:f(ie.Phone)},t(p(ie.Phone),{onChange:D(p(ie.Phone),"Phone - Contact Info"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Phone)})}}))))),r.createElement("div",{className:""},r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,S(u.W.Step.Confirmation.Address)))),r.createElement(te.Z,{dimensions:"3/1"},r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.Address)+" *",wide:!0,required:!0,validationStatus:f(ie.Address)},t(p(ie.Address),{onChange:D(p(ie.Address),"Address - Address"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Address)})}}))),r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.City)+" *",wide:!0,required:!0,validationStatus:f(ie.City)},t(p(ie.City),{onChange:D(p(ie.City),"City - Address"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.City)})}})))),r.createElement(te.Z,{dimensions:"2/2"},r.createElement(ne.Z,(0,g.Z)({inputProps:{disabled:h},placeholder:S(u.W.Step.Confirmation.Inputs.PostCode)+" *",wide:!0,required:!0,validationStatus:f(ie.PostCode)},t(p(ie.PostCode),{onChange:D(p(ie.PostCode),"PostCode - Address"),required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.PostCode)})}}))),r.createElement(K.Qr,{control:o,name:p(ie.Country),rules:{required:{value:!0,message:S(u.W.Step.Confirmation.Inputs.Required,{field:S(u.W.Step.Confirmation.Inputs.Country)})}},render:function(e){var t=e.field,n=(t.ref,t.onChange),a=(0,X.Z)(t,de);return r.createElement(re.Z,(0,g.Z)({disabled:h,validationStatus:f(ie.Country),onChange:function(e){n(e),D(p(ie.Country),"Country - Address")(e)}},a))}})))),r.createElement(c.Z,null)),b.length>1&&0===l?r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement(ce.Z,(0,g.Z)({label:S(u.W.Step.Confirmation.ApplySameInfoToOtherRooms)},t("copyCheckBox")))):null)})))};function pe(){var e=(0,f.$)().t,t=(0,T.WP)().hotel;return r.createElement(r.Fragment,null,r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},e(u.W.Step.Confirmation.Policies))),r.createElement("div",{className:"u-marg-bottom"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col-6 col-md-3"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,e(u.W.Misc.CheckIn))),r.createElement(C.ZP,{type:C.yG.Small},e(u.W.Misc.After)," ",null==t?void 0:t.checkInTime)),r.createElement("div",{className:"col-6 col-md-3"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,e(u.W.Misc.CheckOut))),r.createElement(C.ZP,{type:C.yG.Small},e(u.W.Misc.Before)," ",null==t?void 0:t.checkOutTime)))))}var fe=n(8029),ge=n(2364),ve=n(5112);function Ae(){var e=(0,f.$)().t;return r.createElement(ve.Z,{title:e(u.W.Step.Confirmation.SSLSecure)},r.createElement("img",{src:ge.Z.getAssetUrl()+"assets/img/ssl-secure-connection.png"}))}var Ce=n(3409);function ye(e){var t,n,o=(0,r.useContext)(R.hy),l=(0,f.$)().t,i=(0,r.useState)(q()().add(14,"minute")),s=(0,v.Z)(i,2),d=s[0];s[1],(0,r.useEffect)((function(){var t,n=!1,r=null;return(e.differences.length||null!==(t=e.warnings)&&void 0!==t&&t.length)&&(r=setTimeout((function(){n||e.onClose()}),74e4)),function(){n=!0,clearTimeout(r)}}),[e.differences.length,null===(t=e.warnings)||void 0===t?void 0:t.length]);var m=r.createElement("div",{className:"u-flex"},r.createElement(w.Z,{isText:!0,size:"small",icon:A.Tu.ArrowLeft,onClick:e.onClose,isLoading:e.isLoading},l(u.W.Step.Confirmation.TakeMeBack)),r.createElement(w.Z,{primary:!0,filled:!0,icon:A.Tu.ArrowRight,iconPosition:"right",onClick:e.onProceed,isLoading:e.isLoading},l(u.W.Step.Confirmation.ContinueWithReservation)));return r.createElement(P.Z,{open:!!e.differences.length||!(null===(n=e.warnings)||void 0===n||!n.length),title:l(u.W.Step.Confirmation.YourTotalPriceHasChanged),mobileFooter:m,desktopFooter:r.createElement("div",{className:"u-marg-heavy u-marg@m-"},m),size:P.g.Small,alignCenter:!0},r.createElement("div",{className:"u-marg-heavy u-marg@m-"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col-md-8"},r.createElement(C.ZP,{type:C.yG.Small},l(u.W.Step.Confirmation.ConfirmationCheckoutTitle))),r.createElement("div",{className:"col-md-4"},r.createElement(Ce.ZP,{icon:A.Tu.Time,type:Ce.Rm.Primary},r.createElement("span",{className:"u-marg-right--light"},l(u.W.Step.Confirmation.RevertsIn)),r.createElement(F,{endTimeDate:d})))),r.createElement(c.Z,null),!(!e.differences||!e.differences.length)&&e.differences.map((function(e){var t,n,l,i=o.getAllValidRows().find((function(t){return t.getID()===e.id}));return r.createElement("div",{key:e.id},!!i&&r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(a.Z,null,i.getRoom().name)),r.createElement(C.ZP,null,null===(t=i.getRate())||void 0===t?void 0:t.name)),r.createElement("div",{className:"u-flex u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Body},r.createElement("strong",null,"Displayed price:")),r.createElement(C.ZP,{color:y.Il.Alert},r.createElement(N.Z,null,null===(n=e.totalPrice)||void 0===n?void 0:n.before))),r.createElement("div",{className:"u-flex"},r.createElement(C.ZP,{type:C.yG.Body},r.createElement("strong",null,"Actual price:")),r.createElement(C.ZP,{color:y.Il.Success},r.createElement(N.Z,null,null===(l=e.totalPrice)||void 0===l?void 0:l.after))),r.createElement(c.Z,null))})),!(!e.warnings||!e.warnings.length)&&e.warnings.map((function(e,t){return r.createElement(C.ZP,{key:t},e)}))))}var he=n(1625);function Ee(){var e=(0,r.useContext)(R.hy),t=(0,f.$)().t,n=t(u.W.Misc.Room);return(0,r.useMemo)((function(){var a={},o=e.getAllValidRows(),l=0;return o.length>1?o.forEach((function(e){l++;var t=e.getRate(),n=a["".concat(null==t?void 0:t.cancelPolicyCode,"-").concat(null==t?void 0:t.guaranteeCode)];n||(n=a["".concat(null==t?void 0:t.cancelPolicyCode,"-").concat(null==t?void 0:t.guaranteeCode)]={rooms:[]}),n.rooms.push({index:l,room:e})})):a[0]={rooms:[{index:1,room:o[0]}]},r.createElement("div",{className:"u-marg-bottom"},Object.values(a).map((function(e,a){var o,l,i=e.rooms[0];return r.createElement("div",{className:"u-marg-bottom--heavy",key:a},r.createElement("div",{className:"u-marg-bottom"},e.rooms.map((function(e){var t;return r.createElement(C.ZP,{key:e.index,type:C.yG.Small},r.createElement("strong",null,n," ",e.index)," ",e.room.getRoom().name," - ",null===(t=e.room.getRate())||void 0===t?void 0:t.name)}))),r.createElement("div",{className:"u-marg-bottom"},r.createElement(C.ZP,{type:C.yG.Small,bold:!0},t(u.W.Misc.GuaranteePolicy)),r.createElement(C.ZP,{type:C.yG.Small,preformatted:!0},r.createElement("span",{dangerouslySetInnerHTML:{__html:(null===(o=i.room.getRate())||void 0===o?void 0:o.getGuaranteePolicy())||""}}))),r.createElement(C.ZP,{type:C.yG.Small,bold:!0},t(u.W.Misc.CancellationPolicy)),r.createElement(C.ZP,{type:C.yG.Small,preformatted:!0},r.createElement("span",{dangerouslySetInnerHTML:{__html:(null===(l=i.room.getRate())||void 0===l?void 0:l.getCancellationPolicy())||""}})))})))}),[e.currentBasketRows])}var be=r.forwardRef((function(e,t){var n=(0,f.$)().t,o=e.confirmationPolicyError,l=(0,T.WP)().hotel;return r.createElement(r.Fragment,null,r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},n(u.W.Step.Confirmation.Acknowledgement))),r.createElement("div",null,r.createElement(ce.Z,{label:n(u.W.Step.Confirmation.EmailSpecialOffers)})),r.createElement("div",{className:"u-marg-top--light"},r.createElement(ce.Z,{ref:t,label:r.createElement("div",null,n(u.W.Step.Confirmation.IHaveUnderstoodPrivacyPolicy)," ",r.createElement("a",{style:{color:y.Il.Accent},className:"--underlined",href:null==l?void 0:l.privacyPolicyUrl,target:"_blank",rel:"noreferrer"},n(u.W.Step.Confirmation.PrivacyPolicy)))})),r.createElement(M.Z,{open:o},r.createElement("div",{className:"u-flex u-marg-top"},r.createElement(O.ZP,{type:O.NK.Danger,icon:A.Tu.Error},r.createElement(C.ZP,{type:C.yG.Small},n(u.W.Step.Confirmation.PrivacyPolicyError))))))})),_e=n(1657),xe=n(6222),ke=n(8016),Ze=(0,r.createContext)({}),Pe=function(){return(0,r.useContext)(Ze)},Se=n(5758),we=function(){var e=(0,Se.u)(),t=(0,Se.a)(),n=(0,r.useMemo)((function(){return["paymentMethod","roomstayId","planpay_checkout_id"].map((function(n){return t.get(n)||e.get(n)}))}),[e,t]),a=(0,v.Z)(n,3);return{queryPaymentMethod:a[0],queryRoomstayId:a[1],queryPlanpayCheckoutId:a[2]}},Ne=n(8440),Re=n.n(Ne),Ie=function(e,t){var n,a=e.checked,o=e.onChange,l=e.disabled,i=e.label,c=e.renderContent,s=e.className,u=e.headerRef;return r.createElement("div",{className:E()(Re().root,s,(n={},(0,ee.Z)(n,Re().disabled,l),(0,ee.Z)(n,Re().checked,a),n)),onClick:o,ref:t},r.createElement("div",{className:Re().header,ref:u},r.createElement("div",{className:Re().design}),r.createElement("div",{className:Re().text},i)),c&&a&&r.createElement(M.Z,{open:!0},r.createElement("div",{className:Re().content},c())))},Be=(0,r.forwardRef)(Ie),We=n(9502),Me=n.n(We),De=n(9089),Te=["renderContent"],Ge=function e(t){var n=t.options,a=void 0===n?[]:n,o=t.value,l=t.onChange,i=t.renderChildrenContent;return r.createElement("div",{className:Me().root},a.map((function(t){var n=t.options,a=!(null==n||!n.length),c=(0,r.useState)(null),s=(0,v.Z)(c,2),u=s[0],d=s[1],m=(0,r.useState)(!1),p=(0,v.Z)(m,2),f=p[0],g=p[1],C=a&&o&&n.find((function(e){return e.value===o}))||t,y=r.createElement(Be,{headerRef:d,className:Me().item,key:null==C?void 0:C.value,checked:!(null!=C&&C.disabled)&&(null==C?void 0:C.value)===o,onChange:function(){null!=C&&C.disabled||(a?g(!f):null!=C&&C.value&&(null==l||l(C.value)))},label:null==C?void 0:C.label,disabled:null==C?void 0:C.disabled,renderContent:null==C?void 0:C.renderContent});return null!=C&&C.disabled&&null!=C&&C.disabledReason?r.createElement(ve.Z,{key:null==C?void 0:C.value,wrapperClasses:Me().wrapper,title:null==C?void 0:C.disabledReason},y):r.createElement(r.Fragment,null,r.createElement("div",{key:null==C?void 0:C.value,className:Me().wrapper},y,n&&r.createElement("div",{className:Me().childrenIndicator},r.createElement(A.ZP,{size:"24px",icon:A.Tu.Dropdown}))),n&&r.createElement(De.a,{onClose:function(){return g(!1)},className:Me().overlay,hideStyles:!0,containerClassName:"u-w-100",open:f,followElement:u||void 0,offset:[0,0],placement:"top-start"},r.createElement(e,{options:n.map((function(e){e.renderContent;var t=(0,X.Z)(e,Te);return i?e:t})),onChange:function(e){null==l||l(e),g(!1)},value:o})))})))},Oe=n(9111),Ue=n(1291),qe=function(e){var t,n=e.isCurrent,a=e.isDefault,o=e.style,l=(0,T.WP)().hotel,i=(null!==(t=null==l?void 0:l.paymentCardTypes)&&void 0!==t?t:[]).map((function(e){return Oe.w[e]?{name:Oe.w[e],status:!1}:null})).filter((function(e){return e}));return r.createElement("div",{className:"u-flex flex-row justify-content-start"},Object.keys(i).map((function(e){var t,l;return r.createElement("div",{key:e,id:null===(t=i[e])||void 0===t?void 0:t.name,className:E()("cc-icon u-flex u-marg-right--light",{"-current":null==n?void 0:n(e),"-default":null==a?void 0:a(e)}),style:Object.assign({backgroundImage:"url('".concat(ge.Z.getAssetUrl()+"assets/img/"+(null===(l=i[e])||void 0===l?void 0:l.name)+".png","')"),backgroundSize:"contain"},o||{})})})))},Fe=(0,r.forwardRef)((function(e,t){var n,a=(0,T.WP)().hotel,o=(0,r.useState)({}),l=(0,v.Z)(o,2),i=l[0],c=l[1],s=(0,f.$)().t,d=(0,T.b)().focusElement,m={fontSize:"13px",lineHeight:"18px","&::placeholder":{color:"#8B8F9A",opacity:1}},p=(0,Ue.c)([{label:s(u.W.Step.Confirmation.Inputs.CardNumber),name:"credit-card",type:"card-number",vgsProps:{autoComplete:["cc-number"],successColor:"#4F8A10",errorColor:"#D8000C",showCardIcon:!1,placeholder:s(u.W.Step.Confirmation.Inputs.CardNumber)+" *",validations:["required","validCardNumber"],css:m}},{label:s(u.W.Step.Confirmation.Inputs.NameOnCard),name:"card-name",type:"text",vgsProps:{validations:["required"],css:m,placeholder:s(u.W.Step.Confirmation.Inputs.NameOnCard)+" *"}},{label:s(u.W.Step.Confirmation.Inputs.CardExpiry),name:"expiration-date",type:"card-expiration-date",vgsProps:{placeholder:s(u.W.Step.Confirmation.Inputs.CardExpiry)+" *",validations:["required","validCardExpirationDate"],css:m}},{label:s(u.W.Step.Confirmation.Inputs.SecurityCode),name:"security-code",type:"card-security-code",vgsProps:{placeholder:s(u.W.Step.Confirmation.Inputs.SecurityCode)+" *",validations:["required","validCardSecurityCode"],css:m}}]),g=(0,v.Z)(p.fields,4),y=g[0],h=g[1],E=g[2],b=g[3],_=p.vgsForm,x=function(e){var t={};Object.keys(e).forEach((function(n){var r="";switch(n){case"credit-card":r=s(u.W.Step.Confirmation.Inputs.CardNumber);break;case"expiration-date":r=s(u.W.Step.Confirmation.Inputs.CardExpiry);break;case"security-code":r=s(u.W.Step.Confirmation.Inputs.SecurityCode);break;default:r=s(u.W.Step.Confirmation.Inputs.NameOnCard)}t[n]=r+" "+e[n].errorMessages[e[n].errorMessages.length-1]})),c(t)};(0,r.useEffect)((function(){var e,t;i&&0!==Object.keys(i).length&&null!=y&&null!==(e=y.ref)&&void 0!==e&&e.current&&d(null==y||null===(t=y.ref)||void 0===t?void 0:t.current)}),[i]),(0,r.useImperativeHandle)(t,(function(){return{getTokenizedCode:function(){return new Promise((function(e,t){_?_.submit("/post",{serializer:"deep",methods:"POST"},(function(n,r){var a=JSON.parse(r.data),o=a["expiration-date"].match(/^(\d+)\s*\/\s*(\d+)$/);if(!o||o[1].length>2||4!==o[2].length&&2!==o[2].length)return x({"expiration-date":{errorMessages:[s(u.W.Step.Confirmation.InputErrors.CardExpiry.Invalid)]}}),void t(s(u.W.Step.Confirmation.InputErrors.CardExpiry.Invalid));var l=(1===o[1].length?"0":"")+o[1]+(2===o[2].length?o[2]:o[2].substr(2)),i={CVV:a["security-code"],Expiry:l,Name:a["card-name"],Number:a["credit-card"],Type:y.state.cardType};e(i)}),(function(e){x(e),t(e)})):console.error("VGS not on element, problem has occurred")}))}}}));var k=(0,r.useRef)(null),Z=(null!==(n=null==a?void 0:a.paymentCardTypes)&&void 0!==n?n:[]).map((function(e){return Oe.w[e]?{name:Oe.w[e],status:!1}:null})).filter((function(e){return e}));return r.createElement("div",null,["credit-card","card-name","expiration-date","security-code"].map((function(e){var t=i[e];return r.createElement(M.Z,{open:!!t,key:e},r.createElement("div",{className:"u-flex"},r.createElement(O.ZP,{type:O.NK.Danger,icon:A.Tu.Error},r.createElement(C.ZP,{type:C.yG.Small},t))))})),r.createElement("div",{className:"u-marg-bottom"},r.createElement(qe,{isCurrent:function(e){var t;return null!==y.state.cardType&&(null===(t=Z[e])||void 0===t?void 0:t.name)===y.state.cardType},isDefault:function(e){return null===y.state.cardType}})),r.createElement("form",{ref:k},r.createElement(te.Z,{dimensions:"2/2"},r.createElement("div",{className:y.getClasses(),ref:y.ref}),r.createElement(te.Z,{dimensions:"2/2"},r.createElement("div",{className:E.getClasses(),ref:E.ref}),r.createElement("div",{className:b.getClasses(),ref:b.ref}))),r.createElement(te.Z,{dimensions:"1"},r.createElement("div",{className:h.getClasses(),ref:h.ref}))))})),Le=n(3423),ze=n(9747),je=n(514),Qe=function(){return r.createElement("div",null,r.createElement("div",{className:"row no-gutters"},r.createElement("div",{className:"col-md-4"},r.createElement("div",{className:"d-flex justify-content-center"},r.createElement(ze.Z,{type:"text",w:"md",h:"sm",blink:!0})),r.createElement(ze.Z,{type:"text",h:"md",blink:!0}),r.createElement(ze.Z,{type:"text",h:"md",blink:!0})),r.createElement("div",{className:"col-md-4"},r.createElement("div",{className:"d-flex justify-content-center"},r.createElement(ze.Z,{type:"text",w:"md",h:"sm",blink:!0})),r.createElement(ze.Z,{type:"text",h:"sm",blink:!0}),r.createElement(ze.Z,{type:"text",h:"sm",blink:!0}),r.createElement(ze.Z,{type:"text",h:"sm",blink:!0})),r.createElement("div",{className:"col-md-4"},r.createElement("div",{className:"d-flex justify-content-center"},r.createElement(ze.Z,{type:"text",w:"md",h:"sm",blink:!0})),r.createElement("div",{className:"d-flex justify-content-center u-marg-top u-marg-bottom"},r.createElement(ze.Z,{type:"text",w:"xs",h:"sm",blink:!0,noMarg:!0})),r.createElement("div",{className:"d-flex justify-content-center"},r.createElement(ze.Z,{type:"text",w:"md",h:"sm",blink:!0,noMarg:!0})),r.createElement("div",{className:"d-flex justify-content-center u-marg-top u-marg-bottom"},r.createElement(ze.Z,{type:"text",w:"xs",h:"sm",blink:!0,noMarg:!0})))),r.createElement("div",{className:"row no-gutters"},r.createElement("div",{className:"col-md-4"},r.createElement(ze.Z,{type:"text",h:"lg",blink:!0})),r.createElement("div",{className:"offset-md-4 col-md-4 d-flex align-items-center"},r.createElement(ze.Z,{type:"text",w:"xl",h:"sm",blink:!0}))))},Ve=function(){var e,t,n=(0,r.useContext)(R.hy),a=(0,je.W)().hotel,o=null===(e=n.reservationData)||void 0===e||null===(t=e.payment)||void 0===t?void 0:t.planpay;return(0,r.useLayoutEffect)((function(){null!=o&&o.id&&Le.MQ.checkout.refresh()}),[null==o?void 0:o.id]),(0,r.useEffect)((function(){var e;Le.MQ.init({environment:null==a||null===(e=a.planpay)||void 0===e?void 0:e.env})}),[a]),r.createElement(r.Fragment,null,r.createElement("div",{className:"planpay-payment-container","data-planpay-checkout-id":null==o?void 0:o.id,style:{minHeight:"204px",display:"flex",justifyContent:"flex-end",flexDirection:"column"}},r.createElement(Qe,null)))},$e=n(5729),He=n.n($e),Je=function(e){var t=e.vgsCardName,n=e.large;return r.createElement("div",{className:E()(He().root,(0,ee.Z)({},He()["--large"],n)),style:{backgroundImage:"url('".concat(ge.Z.getImageAssetUrl()+t+".png","')")}})},Ye=n(9605),Ke=n(5498),Xe=n.n(Ke),et=function(e){var t,n=e.card,a=(e.active,(0,f.$)().t),o=(0,R.ZS)().roomstayMember;return r.createElement("div",{className:Xe().root},r.createElement("div",{className:"flex-shrink-0"},n?r.createElement(Je,{vgsCardName:n.type,large:!0}):null),r.createElement("div",null,r.createElement(C.ZP,{align:Ye.P.Left,type:C.yG.Small,color:y.Il.Navy},n?"**** **** **** ".concat(n.cardNumber.slice(-4)):a(u.W.Step.Confirmation.CardLabel)),r.createElement(C.ZP,{className:"u-marg-top--lighter",align:Ye.P.Left,type:C.yG.Caption,color:y.Il.DarkGrey},n?"Expires ".concat((t=n.expiry).slice(0,2)+" / "+t.slice(2)):a(u.W.Step.Confirmation.CardSubLabel))),!n&&r.createElement("div",null,r.createElement(qe,{style:{width:24,height:16,borderRadius:1.5,border:"0.5px solid #DFE1E5"},isCurrent:function(){return!0}})),(null==o?void 0:o.defaultCard)&&n&&n.cardId===o.defaultCard&&r.createElement(Ce.ZP,{size:"small",type:Ce.Rm.Primary},"DEFAULT CARD"))};function tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(n),!0).forEach((function(t){(0,ee.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var at=function(e){var t,n,a=e.tokenizerRef,o=e.onChangeCb,l=(0,f.$)().t,i=(0,K.Gc)(),c=(0,T.WP)().hotel,s=(0,R.Kc)(),d=(0,R.ZS)(),m=d.cards,p=void 0===m?[]:m,g=d.roomstayMember,v=(0,r.useMemo)((function(){return p.find((function(e){return e.cardId===(null==g?void 0:g.defaultCard)}))}),[p,g]),h=i.watch("paymentMethod"),E={value:se.EBookingPaymentMethod.Card,label:r.createElement(et,{active:h===se.EBookingPaymentMethod.Card}),renderContent:function(){return r.createElement(Fe,{ref:a})}},b=[];if(null!=c&&c.paymentMethods.includes(se.EBookingPaymentMethod.Card)){var _;if(p.length){var x=v||p[0];_={value:x.cardId,label:r.createElement(et,{card:x})}}else _=E;var k=[];if(p.length){var Z,P=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){i=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(i)throw o}}}}(p);try{for(P.s();!(Z=P.n()).done;){var S=Z.value;k.push({value:S.cardId,label:r.createElement(et,{card:S})})}}catch(e){P.e(e)}finally{P.f()}k.push(E)}b.push(nt(nt({},_),{},{options:k.length>0?k:void 0}))}return null!=c&&c.paymentMethods.includes(se.EBookingPaymentMethod.Planpay)&&null!=c&&null!==(t=c.planpay)&&void 0!==t&&t.minDaysShowPlanpay&&q()(s.startDate).diff(q()(),"day")>(null==c||null===(n=c.planpay)||void 0===n?void 0:n.minDaysShowPlanpay)&&b.push({value:se.EBookingPaymentMethod.Planpay,label:r.createElement("div",{className:"u-flex u-flex-align-center"},r.createElement("div",null,l(u.W.Step.Confirmation.PlanpayLabel)),r.createElement("div",{className:"u-flex u-flex-align-center u-marg-left--light",style:{borderRadius:"24px",overflow:"hidden"}},r.createElement("img",{height:16,src:ge.Z.getImageAssetUrl("planpay-logo-small.svg"),alt:""})),!i.formState.isValid&&r.createElement(C.ZP,{color:y.Il.Graphite,className:"u-flex u-flex-align-center",style:{color:"#313131",fontSize:10}},r.createElement(A.ZP,{color:y.Il.DarkGrey,icon:A.Tu.Info,className:"u-marg-right--lighter u-marg-left--light"}),l(u.W.Step.Confirmation.PlanpayHelperText))),disabled:!i.formState.isValid,disabledReason:i.formState.isValid?"":"You must fill all the above details before proceeding with Planpay",renderContent:function(){return r.createElement(Ve,null)}}),r.createElement(K.Qr,{control:i.control,name:"paymentMethod",render:function(e){var t=e.field,n=t.onChange,a=t.value;return r.createElement(r.Fragment,null,r.createElement("div",null,r.createElement(Ge,{options:b,value:a,onChange:function(e){n(e),o(e)}})))}})},ot=n(2566),lt=n(2710);function it(){var e=(0,r.useState)({differences:[],warnings:[]}),t=(0,v.Z)(e,2),n=t[0],o=t[1],l=(0,r.useContext)(R.gr),i=(0,r.useState)(""),s=(0,v.Z)(i,2),d=s[0],m=s[1],p=(0,r.useState)(!1),h=(0,v.Z)(p,2),E=h[0],b=h[1],_=(0,r.useRef)(null),x=(0,r.useRef)(null),k=(0,f.$)().t,Z=we(),P=Z.queryPaymentMethod,S=Z.queryRoomstayId,N=Z.queryPlanpayCheckoutId,I=(0,R.dF)(),B=(0,K.Gc)(),W=Pe(),M=W.isBackFromPlanpay,T=W.isLoading,G=W.apiErrors,U=W.clearApiErrors,q=W.book,F=W.rollbackReservation,L=W.commitReservation,z=(0,R.Kc)(),j=(0,r.useRef)(null),Q=(0,ot.J)(),V=(0,R.ZS)().roomstayMember,$=function(){var e=(0,H.Z)(Y().mark((function e(t){var n,r,a,o;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next=e.t0===se.EBookingPaymentMethod.Planpay?3:e.t0===se.EBookingPaymentMethod.Card?10:(e.t0,se.EBookingPaymentMethod.SavedCard,16);break;case 3:return(r=new URLSearchParams(window.location.search)).set("roomstayId","{{rsId}}"),r.set("session",I.sessionProvider.getCurrentSessionID().toString()),r.set("paymentMethod",se.EBookingPaymentMethod.Planpay),a="".concat(window.location.origin).concat(window.location.pathname).concat(window.location.search,"#/step/confirmation/?").concat(r),n={Method:se.EBookingPaymentMethod.Planpay,PlanpayCheckoutId:N||void 0,RedirectUrl:a},e.abrupt("break",17);case 10:return e.t1=se.EBookingPaymentMethod.Card,e.next=13,null===(o=j.current)||void 0===o?void 0:o.getTokenizedCode();case 13:return e.t2=e.sent,n={Method:e.t1,PaymentCard:e.t2},e.abrupt("break",17);case 16:n={Method:se.EBookingPaymentMethod.SavedCard,SavedCardID:t};case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){var e,t,n="";return n=Object.values(se.EBookingPaymentMethod).includes(P)?P:null!=V&&V.defaultCard&&null!=V&&null!==(e=V.cards)&&void 0!==e&&e.find((function(e){return e.cardId===(null==V?void 0:V.defaultCard)}))?null==V?void 0:V.defaultCard:se.EBookingPaymentMethod.Card,B.setValue("paymentMethod",n),oe(n),M&&(S===(null===(t=z.reservationData)||void 0===t?void 0:t.roomstayId)?J():null==F||F()),function(){M||null==F||F()}}),[]);var J=function(){var e=(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==L?void 0:L(z.reservationData);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=B.watch("paymentMethod");I.engine.getSessionProvider().getSession().then((function(e){m(e.source)}));var ee=function(){var e=(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Q((0,_e.Z)().getStepUrl());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae(X,function(){var e=(0,H.Z)(Y().mark((function e(t){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null==L?void 0:L(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:return e.abrupt("return",!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(e){var t=null==l?void 0:l.errorChecks.every((function(t){return t().validate(e)}));return void 0===t||t},ae=function(){var e=(0,H.Z)(Y().mark((function e(t,n){var r;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==q?void 0:q((0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$(t));case 1:case"end":return e.stop()}}),e)}))),null===(r=x.current)||void 0===r?void 0:r.value,(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=void 0,!xe.Z.isActive()||null!=_&&null!==(n=_.current)&&void 0!==n&&n.checked){e.next=3;break}return b(!0),e.abrupt("return",!1);case 3:if(re(!0)){e.next=5;break}return e.abrupt("return",!1);case 5:if(e.prev=5,t!==se.EBookingPaymentMethod.Card){e.next=9;break}return e.next=9,j.current.getTokenizedCode();case 9:return e.abrupt("return",!0);case 12:return e.prev=12,e.t0=e.catch(5),e.abrupt("return",!1);case 15:case"end":return e.stop()}var n}),e,null,[[5,12]])}))),(function(e){e&&o(e)}),n);case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),oe=function(){var e=(0,H.Z)(Y().mark((function e(t){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t===se.EBookingPaymentMethod.Planpay){e.next=3;break}return e.next=3,null==F?void 0:F();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.createElement("form",null,M?r.createElement(D.Z,null):r.createElement(r.Fragment,null,r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(a.Z,{bold:!0},k(u.W.Step.Confirmation.GuestDetails))),r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.Success},r.createElement("strong",null,k(u.W.Step.Confirmation.AlmostDone,{required:"*"})))),r.createElement(me,null),"inline"===d?r.createElement(O.ZP,{type:O.NK.Accent2,heavyPadding:!0},r.createElement("div",{className:"u-flex u-w-100 flex-wrap flex-xl-nowrap"},r.createElement("div",null,r.createElement(C.ZP,{color:y.Il.Accent,bold:!0},k(u.W.Step.Confirmation.WantMoreRooms)),r.createElement(C.ZP,{color:y.Il.Navy},k(u.W.Step.Confirmation.YouCanAddAndEditRooms))),r.createElement("div",{className:"d-flex align-items-center u-marg-top@xl-"},r.createElement(w.Z,{filled:!0,primary:!0,icon:A.Tu.Add,iconPosition:"left",onClick:ee},k(u.W.Step.Confirmation.AddMoreRooms))))):r.createElement(r.Fragment,null),ke.Z.isActive()&&r.createElement(r.Fragment,null,r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},"Travel Agent")),r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Small},r.createElement("strong",null,k(u.W.Step.Confirmation.Inputs.IATANumber)))),r.createElement("div",{className:"u-marg-bottom--light"},r.createElement(C.ZP,{type:C.yG.Small},k(u.W.Step.Confirmation.Inputs.IATANumberGuide))),r.createElement(ne.Z,(0,g.Z)({placeholder:k(u.W.Step.Confirmation.Inputs.IATANumber),wide:!0},B.register("IATANumber")))),r.createElement(c.Z,null)),r.createElement(lt.h,{inputRef:x}),r.createElement(c.Z,null),r.createElement("div",{className:"u-marg-bottom--heavy"},r.createElement("div",{className:"u-marg-bottom"},r.createElement(a.Z,{bold:!0},k(u.W.Navigation.Menu.PaymentInformation))),r.createElement(at,{tokenizerRef:j,onChangeCb:function(){var e=(0,H.Z)(Y().mark((function e(t){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe(t);case 2:if(t!==se.EBookingPaymentMethod.Planpay){e.next=5;break}return e.next=5,ae(t);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),r.createElement("div",{className:"u-marg-top u-flex align-items-center"},r.createElement("div",{className:"u-flex align-items-center justify-content-start"},r.createElement(A.ZP,{icon:A.Tu.Lock,color:y.Il.Success}),r.createElement("div",{className:"u-marg-left--light"},r.createElement(C.ZP,{type:C.yG.Small,color:y.Il.Success},r.createElement("strong",null,k(u.W.Step.Confirmation.Secured))))),r.createElement(Ae,null))),r.createElement(c.Z,null),r.createElement(pe,null),r.createElement("div",{className:"u-pad-top--light u-marg-bottom"},r.createElement(Ee,null)),xe.Z.isActive()&&r.createElement(r.Fragment,null,r.createElement(c.Z,null),r.createElement("div",null,r.createElement(be,{ref:_,confirmationPolicyError:E}))),r.createElement("div",{className:"u-flex u-marg-top--heavy justify-content-end"},r.createElement(fe.Z,{disabled:X===se.EBookingPaymentMethod.Planpay||T,text:k(u.W.Step.Confirmation.ConfirmReservation),isLoading:T,onClick:te}))),r.createElement(he.default,{open:!!G,onClose:U},r.createElement(C.ZP,null,G)),r.createElement(ye,{differences:n.differences,warnings:n.warnings,isLoading:T,onClose:(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==F?void 0:F();case 2:Q((0,_e.Z)().getStepUrl());case 3:case"end":return e.stop()}}),e)}))),onProceed:(0,H.Z)(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(X!==se.EBookingPaymentMethod.Planpay){e.next=4;break}o({differences:[],warnings:[]}),e.next=6;break;case 4:return e.next=6,null==L?void 0:L(z.reservationData);case 6:case"end":return e.stop()}}),e)})))}))}var ct=n(9666),st=n(3819),ut=Ze.Provider,dt=function(e){var t=e.children,n=we(),a=n.queryPaymentMethod,o=n.queryRoomstayId,l=n.queryPlanpayCheckoutId,i=(0,r.useState)(!1),c=(0,v.Z)(i,2),s=c[0],d=c[1],m=(0,r.useState)(""),p=(0,v.Z)(m,2),g=p[0],A=p[1],C=(0,K.cI)({mode:"onChange"}),y=(0,r.useContext)(R.hy),h=y.getAllValidRows(),E=y.basketAddonRows,b=(0,T.WP)().hotel,_=(0,f.$)().t,x=function(e){return e.userProfiles.map((function(e){return{FirstName:e.Forename,LastName:e.Surname,Phone:e.Phone.replace(" ",""),Email:e.Email,Address:{Line1:e.Address,City:e.City,PostalCode:e.PostCode,Country:e.Country},MarketingOptIn:!1}}))},k=function(){var e=(0,H.Z)(Y().mark((function e(t){var n;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=[],!t.reservations){e.next=5;break}t.reservations.forEach((function(e,t){var r=y.currentBasketRows[t].checkDiffFromReservation(e);r&&n.push(r)})),e.next=7;break;case 5:throw ct.n_({level:st.z.Error,message:"No reservation data: "+JSON.stringify(t)}),new Error("The reservation could not be completed due to an unexpected issue, please try again");case 7:if(!(n.length||t.warnings&&t.warnings.length)){e.next=9;break}return e.abrupt("return",{differences:n,warnings:t.warnings});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Z=function(e,t,n,r,a){return function(){var o=(0,H.Z)(Y().mark((function o(l){var i,c,s,m;return Y().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(L.ZP.instance.sendInteraction("Complete Booking",L.s_.BUTTON,L._J.GUEST_DETAILS),d(!0),o.t0=!n,o.t0){o.next=7;break}return o.next=6,n();case 6:o.t0=o.sent;case 7:if(o.t0){o.next=11;break}return d(!1),o.abrupt("return");case 11:return o.next=13,e();case 13:return c=o.sent,o.prev=14,o.next=17,W.Z.Reservation.bookNow(h,x(l),c,E,t||"",null==b?void 0:b.hotelID);case 17:return i=o.sent,y.booked(i),o.next=21,k(i);case 21:if(!(s=o.sent)){o.next=27;break}d(!1),null==r||r(s),o.next=29;break;case 27:return o.next=29,null==a?void 0:a(i);case 29:o.next=35;break;case 31:o.prev=31,o.t1=o.catch(14),console.log(o.t1),A(null!==(m=null===o.t1||void 0===o.t1?void 0:o.t1.Message)&&void 0!==m?m:_(u.W.Step.Confirmation.UnexpectedErrorFromBookingDatabase));case 35:return o.prev=35,d(!1),o.finish(35);case 38:case"end":return o.stop()}}),o,null,[[14,31,35,38]])})));return function(e){return o.apply(this,arguments)}}()},P=!!l&&!!o&&!!a,S=function(e){var t;return null==e||null===(t=e.reservations)||void 0===t?void 0:t.map((function(e){return e.reservationNumber}))},w=function(){var e=(0,H.Z)(Y().mark((function e(t){var n,r;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,d(!0),!t){e.next=18;break}if(!(n=S(t)).length){e.next=15;break}return e.prev=5,e.next=8,W.Z.Reservation.commit(n,t.itineraryNumber,null==b?void 0:b.hotelID,l||void 0).then((function(e){try{L.ZP.instance.sendReservationConfirmed(y.getAllValidRows(),y.basketAddonRows,e)}catch(e){ct.Tb("Failed to read reservations from GTM code: "+JSON.stringify(e))}y.checkedOut(e)})).catch((function(e){console.log(e),A(_(u.W.Misc.UnexpectedError))})).finally((function(){d(!1)}));case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),A(null!==(r=null===e.t0||void 0===e.t0?void 0:e.t0.Message)&&void 0!==r?r:_(u.W.Step.Confirmation.UnexpectedErrorFromBookingDatabase));case 13:e.next=18;break;case 15:A(_(u.W.Step.Confirmation.UnexpectedErrorOnCommittingReservation)),R.qL.add({message:_(u.W.Step.Confirmation.UnexpectedErrorOnCommittingReservation)}),ct.Tb("No reservation IDs found when attempting to commit: "+JSON.stringify(t));case 18:e.next=26;break;case 20:e.prev=20,e.t1=e.catch(0),A(_(u.W.Step.Confirmation.FailedToCommitReservation)),console.log("Failed to commit reservation "),console.error(e.t1),ct.Tb(e.t1);case 26:case"end":return e.stop()}}),e,null,[[0,20],[5,10]])})));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=(0,H.Z)(Y().mark((function e(){var t;return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y.reservationData){e.next=2;break}return e.abrupt("return");case 2:if(e.prev=2,!(t=S(y.reservationData)).length){e.next=10;break}return d(!0),e.next=8,W.Z.Reservation.rollback(t,y.reservationData.itineraryNumber,null==b?void 0:b.hotelID);case 8:e.next=11;break;case 10:ct.Tb("No reservation IDs found when attempting to rollback: "+JSON.stringify(y.reservationData));case 11:e.next=17;break;case 13:e.prev=13,e.t0=e.catch(2),console.log("Failed to rollback reservations"),ct.Tb(e.t0);case 17:return e.prev=17,y.rollback(),d(!1),e.finish(17);case 21:case"end":return e.stop()}}),e,null,[[2,13,17,21]])})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=(0,H.Z)(Y().mark((function e(t,n,r,a,o){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C.handleSubmit(Z(t,n,r,a,o))();case 2:case"end":return e.stop()}}),e)})));return function(t,n,r,a,o){return e.apply(this,arguments)}}();return r.createElement(K.RV,C,r.createElement(ut,{value:{book:I,commitReservation:w,rollbackReservation:N,isLoading:s,apiErrors:g,clearApiErrors:function(){return A("")},isBackFromPlanpay:P}},t))};function mt(){return r.createElement(dt,null,r.createElement(it,null))}var pt=n(6409),ft=function(){var e=(0,r.useContext)(R.g7),t=(0,r.useContext)(R.aN).currentStep,n=(0,r.useContext)(R.hy).currentBasketRows,g=(0,f.$)().t,v=(0,V.z)().raise;return(0,r.useEffect)((function(){var e=new $.z(n);v(e)}),[]),r.createElement("div",{className:"container"},r.createElement(d.default,null),r.createElement(pt.i5,null,r.createElement(pt.mV,null,e.screenSize>m.Z.Medium&&r.createElement(r.Fragment,null,r.createElement(i.rU,{to:o.Z.getPreviousStepUrl(t)},r.createElement(s.Z,null)),r.createElement("div",{className:"u-marg-top--light u-marg-bottom--heavy"},r.createElement(a.Z,{bold:!0},g(u.W.Navigation.Steps.Confirmation)))),r.createElement("div",{className:"u-marg-top@m-"},r.createElement(j.Z,null))),e.screenSize>m.Z.Medium&&r.createElement(pt.f,null,r.createElement(p.Z,null))),r.createElement(c.Z,null),r.createElement(pt.i5,null,r.createElement(pt.mV,null,r.createElement("div",{className:"block-container"},!Q.Z.isActive()&&r.createElement(G,null),r.createElement(R.s$,null,r.createElement(mt,null)))),e.screenSize>m.Z.Medium&&r.createElement(pt.f,null,r.createElement(z,{endDate:q()().add(10,"minute")}),r.createElement(l.v,{showImages:!0}))))}},2899:function(e,t,n){(t=n(3645)(!0)).push([e.id,".InlinePaymentCard-module__root___3JISW{width:24px;height:16px;background-size:contain;background-repeat:no-repeat;border-radius:2.5px;border:.5px solid #dfe1e5}.InlinePaymentCard-module__root___3JISW.InlinePaymentCard-module__--large____T4UH{width:48px;height:32px}","",{version:3,sources:["InlinePaymentCard.module.scss"],names:[],mappings:"AAAA,wCAAM,UAAU,CAAC,WAAW,CAAC,uBAAuB,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,yBAAyB,CAAC,kFAAc,UAAU,CAAC,WAAW",file:"InlinePaymentCard.module.scss",sourcesContent:[".root{width:24px;height:16px;background-size:contain;background-repeat:no-repeat;border-radius:2.5px;border:.5px solid #dfe1e5}.root.--large{width:48px;height:32px}"]}]),t.locals={root:"InlinePaymentCard-module__root___3JISW","--large":"InlinePaymentCard-module__--large____T4UH"},e.exports=t},4319:function(e,t,n){(t=n(3645)(!0)).push([e.id,".InlinePaymentOption-module__root___qRPN1{display:flex;align-items:center;gap:12px;margin-left:4px}","",{version:3,sources:["InlinePaymentOption.module.scss"],names:[],mappings:"AAAA,0CAAM,YAAY,CAAC,kBAAkB,CAAC,QAAQ,CAAC,eAAe",file:"InlinePaymentOption.module.scss",sourcesContent:[".root{display:flex;align-items:center;gap:12px;margin-left:4px}"]}]),t.locals={root:"InlinePaymentOption-module__root___qRPN1"},e.exports=t},987:function(e,t,n){(t=n(3645)(!0)).push([e.id,'.roomstay-booking-container .RadioButton-module__root___1w9es{width:100%;display:block;border:1px solid var(--rs-color-light-grey);border-radius:8px;margin:10px 0;cursor:pointer;transition:.3s}.roomstay-booking-container .RadioButton-module__root___1w9es+.RadioButton-module__root___1w9es{margin-top:8px}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__disabled___1HXUO{background:#f6f6fa;cursor:not-allowed}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__disabled___1HXUO .RadioButton-module__design___3kmtW{border:solid 1px #dfe1e5;background:rgba(0,0,0,0)}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__disabled___1HXUO .RadioButton-module__design___3kmtW::before{background:rgba(0,0,0,0)}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__disabled___1HXUO .RadioButton-module__text___1CCxU{color:#c0c3cc}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__checked___XmNJ8 .RadioButton-module__design___3kmtW{background:var(--rs-color-accent-2);border:solid 1px var(--rs-color-accent-1)}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__checked___XmNJ8 .RadioButton-module__design___3kmtW::before{transform:translate(-50%, -50%) scale(1);background:var(--rs-color-accent-1)}.roomstay-booking-container .RadioButton-module__root___1w9es.RadioButton-module__checked___XmNJ8 .RadioButton-module__text___1CCxU{color:var(--rs-color-navy)}.roomstay-booking-container .RadioButton-module__input___3WTPl{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;z-index:-1}.roomstay-booking-container .RadioButton-module__design___3kmtW{flex-shrink:0;width:16px;height:16px;border-radius:100px;position:relative;border:solid 1px var(--rs-color-light-grey)}.roomstay-booking-container .RadioButton-module__design___3kmtW::before{content:"";width:10px;height:10px;display:inline-block;border-radius:inherit;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0,0,0,0);transition:.3s;position:absolute}.roomstay-booking-container .RadioButton-module__text___1CCxU{color:var(--rs-color-navy);font-size:14px;font-weight:400;line-height:18px;margin-left:8px;transition:.3s}.roomstay-booking-container .RadioButton-module__content___2b4U9{display:block;padding:16px;border-top:solid 1px var(--rs-color-light-grey)}.roomstay-booking-container .RadioButton-module__header___2nA7I{padding:8px 16px;display:flex;align-items:center}.roomstay-booking-container .RadioButton-module__header___2nA7I:hover{background:rgba(204,204,204,.14)}',"",{version:3,sources:["RadioButton.module.scss"],names:[],mappings:"AAAA,8DAA2C,UAAU,CAAC,aAAa,CAAC,2CAA2C,CAAC,iBAAiB,CAAC,aAAa,CAAC,cAAc,CAAC,cAAc,CAAC,gGAAiD,cAAc,CAAC,mGAAoD,kBAAkB,CAAC,kBAAkB,CAAC,uIAA4D,wBAAwB,CAAC,wBAAwB,CAAC,+IAAoE,wBAAwB,CAAC,qIAA0D,aAAa,CAAC,sIAA2D,mCAAmC,CAAC,yCAAyC,CAAC,8IAAmE,wCAAwC,CAAC,mCAAmC,CAAC,oIAAyD,0BAA0B,CAAC,+DAA4C,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,gEAA6C,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,2CAA2C,CAAC,wEAAqD,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAAC,wBAAwB,CAAC,cAAc,CAAC,iBAAiB,CAAC,8DAA2C,0BAA0B,CAAC,cAAc,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,cAAc,CAAC,iEAA8C,aAAa,CAAC,YAAY,CAAC,+CAA+C,CAAC,gEAA6C,gBAAgB,CAAC,YAAY,CAAC,kBAAkB,CAAC,sEAAmD,gCAAgC",file:"RadioButton.module.scss",sourcesContent:[':global(.roomstay-booking-container) .root{width:100%;display:block;border:1px solid var(--rs-color-light-grey);border-radius:8px;margin:10px 0;cursor:pointer;transition:.3s}:global(.roomstay-booking-container) .root+.root{margin-top:8px}:global(.roomstay-booking-container) .root.disabled{background:#f6f6fa;cursor:not-allowed}:global(.roomstay-booking-container) .root.disabled .design{border:solid 1px #dfe1e5;background:rgba(0,0,0,0)}:global(.roomstay-booking-container) .root.disabled .design::before{background:rgba(0,0,0,0)}:global(.roomstay-booking-container) .root.disabled .text{color:#c0c3cc}:global(.roomstay-booking-container) .root.checked .design{background:var(--rs-color-accent-2);border:solid 1px var(--rs-color-accent-1)}:global(.roomstay-booking-container) .root.checked .design::before{transform:translate(-50%, -50%) scale(1);background:var(--rs-color-accent-1)}:global(.roomstay-booking-container) .root.checked .text{color:var(--rs-color-navy)}:global(.roomstay-booking-container) .input{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;z-index:-1}:global(.roomstay-booking-container) .design{flex-shrink:0;width:16px;height:16px;border-radius:100px;position:relative;border:solid 1px var(--rs-color-light-grey)}:global(.roomstay-booking-container) .design::before{content:"";width:10px;height:10px;display:inline-block;border-radius:inherit;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0,0,0,0);transition:.3s;position:absolute}:global(.roomstay-booking-container) .text{color:var(--rs-color-navy);font-size:14px;font-weight:400;line-height:18px;margin-left:8px;transition:.3s}:global(.roomstay-booking-container) .content{display:block;padding:16px;border-top:solid 1px var(--rs-color-light-grey)}:global(.roomstay-booking-container) .header{padding:8px 16px;display:flex;align-items:center}:global(.roomstay-booking-container) .header:hover{background:rgba(204,204,204,.14)}']}]),t.locals={root:"RadioButton-module__root___1w9es",disabled:"RadioButton-module__disabled___1HXUO",design:"RadioButton-module__design___3kmtW",text:"RadioButton-module__text___1CCxU",checked:"RadioButton-module__checked___XmNJ8",input:"RadioButton-module__input___3WTPl",content:"RadioButton-module__content___2b4U9",header:"RadioButton-module__header___2nA7I"},e.exports=t},5205:function(e,t,n){(t=n(3645)(!0)).push([e.id,".RadioButtonGroup-module__root___3QZUp{position:relative}.RadioButtonGroup-module__root___3QZUp .RadioButtonGroup-module__wrapper___3_Rg6{position:relative}.RadioButtonGroup-module__root___3QZUp .RadioButtonGroup-module__wrapper___3_Rg6:first-child .RadioButtonGroup-module__item___3rGSy{border-top-left-radius:5px !important;border-top-right-radius:5px !important}.RadioButtonGroup-module__root___3QZUp .RadioButtonGroup-module__wrapper___3_Rg6:last-child .RadioButtonGroup-module__item___3rGSy{border-bottom:1px solid var(--rs-color-light-grey) !important;border-bottom-left-radius:5px !important;border-bottom-right-radius:5px !important}.RadioButtonGroup-module__root___3QZUp .RadioButtonGroup-module__item___3rGSy{border-radius:0 !important;margin-top:0 !important;margin-bottom:0 !important;border-bottom:0 !important}.RadioButtonGroup-module__overlay___p2ip9{background-color:#fff;box-shadow:0px 8px 24px rgba(0,0,0,.25);border:1px solid #dfe1e5;border-radius:5px}.RadioButtonGroup-module__childrenIndicator___16sSu{position:absolute;right:16px;top:16px;pointer-events:none}","",{version:3,sources:["RadioButtonGroup.module.scss"],names:[],mappings:"AAAA,uCAAM,iBAAiB,CAAC,iFAAe,iBAAiB,CAAC,oIAAiC,qCAAqC,CAAC,sCAAsC,CAAC,mIAAgC,6DAA6D,CAAC,wCAAwC,CAAC,yCAAyC,CAAC,8EAAY,0BAA0B,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,0BAA0B,CAAC,0CAAS,qBAAqB,CAAC,uCAAuC,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,oDAAmB,iBAAiB,CAAC,UAAU,CAAC,QAAQ,CAAC,mBAAmB",file:"RadioButtonGroup.module.scss",sourcesContent:[".root{position:relative}.root .wrapper{position:relative}.root .wrapper:first-child .item{border-top-left-radius:5px !important;border-top-right-radius:5px !important}.root .wrapper:last-child .item{border-bottom:1px solid var(--rs-color-light-grey) !important;border-bottom-left-radius:5px !important;border-bottom-right-radius:5px !important}.root .item{border-radius:0 !important;margin-top:0 !important;margin-bottom:0 !important;border-bottom:0 !important}.overlay{background-color:#fff;box-shadow:0px 8px 24px rgba(0,0,0,.25);border:1px solid #dfe1e5;border-radius:5px}.childrenIndicator{position:absolute;right:16px;top:16px;pointer-events:none}"]}]),t.locals={root:"RadioButtonGroup-module__root___3QZUp",wrapper:"RadioButtonGroup-module__wrapper___3_Rg6",item:"RadioButtonGroup-module__item___3rGSy",overlay:"RadioButtonGroup-module__overlay___p2ip9",childrenIndicator:"RadioButtonGroup-module__childrenIndicator___16sSu"},e.exports=t},5729:function(e,t,n){var r=n(3379),a=n(2899);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}},5498:function(e,t,n){var r=n(3379),a=n(4319);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}},8440:function(e,t,n){var r=n(3379),a=n(987);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}},9502:function(e,t,n){var r=n(3379),a=n(5205);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}}}]);
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[370],{370:function(e,t,l){l.r(t),l.d(t,{default:function(){return W}});var r=l(885),a=l(7294),n=l(584),o=l(7754),c=l(8886),m=l(3010),i=l(9605),s=l(858),u=l(6793),d=l(9478),p=l(292),y=l(4942),E=l(5128),f=l(9874),g=l(4394),v=l(195),b=l(783),h=l(6401),P=l(4826),Z=l(513),D=l(360),N=l(3261),S=l(4854),k=l(3727),C=l(8555),G=l(3933),O=l(7688);function x(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),l.push.apply(l,r)}return l}function w(e){var t,l,p,w,I=(0,a.useContext)(D.hy),M=(0,O.WP)().hotel,W=I.getAllValidRows(),A=I.basketAddonRows,j=(0,u.$)().t,R=(0,a.useState)({}),T=(0,r.Z)(R,2),z=T[0],B=T[1];(0,a.useEffect)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?x(Object(l),!0).forEach((function(t){(0,y.Z)(e,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):x(Object(l)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))}))}return e}({},G.B);e.TransportDistanceBlock.component=a.createElement("div",{className:"u-flex justify-content-center u-marg-top u-marg-bottom"},a.createElement("div",{className:"col-10 u-flex flex-row"},a.createElement(P.Z,{vertical:!0,hotel:M}))),e.PerksBlock.component=a.createElement(h.v,{size:"mobile"}),B(e)}),[]);var F=(0,O.Q$)(z).sortedComponents,$=I.endDate?I.endDate.diff(I.startDate,"day"):0,U=[null==M||null===(t=M.address)||void 0===t?void 0:t.line1,null==M||null===(l=M.address)||void 0===l?void 0:l.city],V=[null==M||null===(p=M.address)||void 0===p?void 0:p.postalCode,null==M||null===(w=M.address)||void 0===w?void 0:w.state],K=function(e){var t=e.filter((function(e){return!!e&&"0"!==e})).join(", ");return t?a.createElement(n.ZP,{type:n.yG.Small},t):null},L=function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)};return a.createElement(E.Z,{open:e.isOpen,title:j(d.W.Misc.Summary),onClose:function(){return e.onClose?e.onClose():null},mobileFooter:a.createElement("div",{className:"row align-items-center"},a.createElement("div",{className:"col-4"},a.createElement(n.ZP,{type:n.yG.Body},j(d.W.Misc.Total)),a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Accent},a.createElement("strong",null,N.Z.pluralWithDictAndCount($,d.W.Misc.Night,j)))),a.createElement("div",{className:"col-8 u-flex u-flex-direction-column align-items-end"},a.createElement(m.Z,{bold:!0,size:"normal",align:i.P.Right},a.createElement(s.Z,null,I.getTotalPrice())),a.createElement(n.ZP,{color:o.Il.DarkGrey,type:n.yG.Small,align:i.P.Right},a.createElement("span",{className:"u-nowrap"},j(d.W.Step.Room.RoomInfo.IncludesTaxes)))))},a.createElement(a.Fragment,null,a.createElement("div",{className:"container"},a.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},a.createElement("div",{className:"col-6"},a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Grey},a.createElement("strong",null,j(d.W.Misc.CheckIn))),a.createElement(n.ZP,{type:n.yG.Small},j(d.W.Misc.After)," ",null==M?void 0:M.checkInTime)),a.createElement("div",{className:"col-6"},a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Grey},a.createElement("strong",null,j(d.W.Misc.CheckOut))),a.createElement(n.ZP,{type:n.yG.Small},j(d.W.Misc.Before)," ",null==M?void 0:M.checkOutTime))),a.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},a.createElement("div",{className:"col-8"},a.createElement("div",{className:"u-flex u-flex-flex-start"},a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",I.startDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},I.startDate?I.startDate.format("ddd, MMM D"):j(d.W.Step.Date.Arrival))),a.createElement("span",{className:"u-marg-left-right--light"},a.createElement(c.ZP,{icon:c.Tu.ArrowRight2,size:"18px",color:o.Il.DarkGrey})),a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",I.endDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},I.endDate?I.endDate.format("ddd, MMM D"):j(d.W.Step.Date.Departure)))),a.createElement(n.ZP,{type:n.yG.Small},I.getNumberOfAdults(!0),", ",I.getNumberOfChildren(!0),", ",I.getNumberOfRooms(!0))),a.createElement("div",{className:"col-4 u-align-right"},a.createElement(k.rU,{to:C.Z.getStepUrl()},a.createElement(S.Z,{onClick:function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)},size:"tiny"},j(d.W.Misc.Edit).toUpperCase())))),W&&W.length?a.createElement(a.Fragment,null,W.map((function(t,l){if(t.isValid())return a.createElement(v.Z,{row:t,index:l,key:t.getID(),showImages:!!e.showImages,onEditPropertyClicked:L})})),A.length>0&&a.createElement(a.Fragment,null,a.createElement(f.Z,{noMargins:!0,darker:!0}),a.createElement("div",{className:"u-marg-top"},a.createElement(n.ZP,{type:n.yG.Label,color:o.Il.DarkGrey},a.createElement("strong",null,"Add-on Items"))),A.map((function(e,t){return a.createElement(b.Z,{row:e,key:e.getID(),onRemoveClick:function(){return I.removeBasketAddonRow(e)}})})))):a.createElement("div",{className:"u-marg-bottom--heavy u-marg-top--heavy"},a.createElement("div",{className:"u-marg-bottom--heavy"},a.createElement(n.ZP,{type:n.yG.Body},j(d.W.Step.General.YourCartIsEmpty))),a.createElement("div",{style:{height:"150px",position:"relative"}},a.createElement(g.Z,null)),a.createElement("div",{className:"u-marg-top"},a.createElement("div",{className:"u-marg-bottom"},a.createElement(n.ZP,{bold:!0},null==M?void 0:M.name)),K(U),K(V))),F,a.createElement("div",{className:"u-marg-top--heavy u-marg-bottom--heavy"},a.createElement(Z.Z,null)))))}var I=l(1069),M=l(6061);function W(){var e=(0,a.useContext)(D.g7).screenSize,t=(0,a.useContext)(D.aN).currentStep,l=a.useContext(D.hy),y=(0,u.$)().t,E=(0,a.useState)(!1),f=(0,r.Z)(E,2),g=f[0],v=f[1];return e<=p.Z.Medium?a.createElement(a.Fragment,null,a.createElement("div",{className:"be-mobile-summary row u-border-bottom u-pad-top-bottom u-marg-bottom",onClick:function(){v(!0)}},a.createElement("div",{className:"col-8"},a.createElement("div",{className:"u-flex u-flex-flex-start"},a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",l.startDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},l.startDate?l.startDate.format("ddd, MMM D"):y(d.W.Step.Date.Arrival))),a.createElement("span",{className:"u-marg-left-right--light"},a.createElement(c.ZP,{icon:c.Tu.ArrowRight2,size:"18px",color:o.Il.DarkGrey})),a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",l.endDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},l.endDate?l.endDate.format("ddd, MMM D"):y(d.W.Step.Date.Departure)))),a.createElement(n.ZP,{type:n.yG.Small},l.getNumberOfAdults(!0),", ",l.getNumberOfChildren(!0),", ",l.getNumberOfRooms(!0))),a.createElement("div",{className:"col-4 u-flex u-flex-flex-end u-flex-align-center"},a.createElement(m.Z,{bold:!0,size:"normal",align:i.P.Right},t===M.Z?a.createElement(I.Z,{isMobile:!0}):a.createElement(s.Z,null,l.getTotalPrice())),a.createElement(c.ZP,{icon:c.Tu.Dropdown,size:"18px",color:o.Il.DarkGrey}))),a.createElement(w,{isOpen:g,onClose:function(){v(!1)}})):a.createElement(a.Fragment,null)}},513:function(e,t,l){l.d(t,{Z:function(){return s}});var r=l(7294),a=l(7754),n=l(584),o=l(7688),c=l(6793),m=l(9116),i=l(9478);function s(){var e=(0,o.WP)().hotel,t=(0,c.$)().t;return r.createElement("div",{className:"summary-privacy-policy"},r.createElement(n.ZP,{type:n.yG.Body},r.createElement("strong",null,t(i.W.Step.Confirmation.PrivacyPolicy))),r.createElement(n.ZP,{className:"u-marg-top--light",type:n.yG.Small,color:a.Il.DarkGrey},r.createElement(m.c,{i18nKey:i.W.Step.Confirmation.PrivacyPolicyDetail,components:[r.createElement("a",{key:0,href:null==e?void 0:e.policies,target:"_blank",style:{color:"var(--rs-color-accent-1)"},rel:"noreferrer"})]})))}}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[370],{370:function(e,t,l){l.r(t),l.d(t,{default:function(){return W}});var r=l(885),a=l(7294),n=l(584),o=l(7754),c=l(8886),m=l(3010),i=l(9605),s=l(858),u=l(6793),d=l(9478),p=l(292),y=l(4942),E=l(5128),f=l(9874),g=l(4394),v=l(195),b=l(783),h=l(6401),P=l(4826),Z=l(513),D=l(360),N=l(3261),S=l(4854),k=l(3727),C=l(1657),G=l(3933),O=l(7688);function x(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),l.push.apply(l,r)}return l}function w(e){var t,l,p,w,I=(0,a.useContext)(D.hy),M=(0,O.WP)().hotel,W=I.getAllValidRows(),A=I.basketAddonRows,j=(0,u.$)().t,R=(0,a.useState)({}),T=(0,r.Z)(R,2),z=T[0],B=T[1];(0,a.useEffect)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?x(Object(l),!0).forEach((function(t){(0,y.Z)(e,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):x(Object(l)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))}))}return e}({},G.B);e.TransportDistanceBlock.component=a.createElement("div",{className:"u-flex justify-content-center u-marg-top u-marg-bottom"},a.createElement("div",{className:"col-10 u-flex flex-row"},a.createElement(P.Z,{vertical:!0,hotel:M}))),e.PerksBlock.component=a.createElement(h.v,{size:"mobile"}),B(e)}),[]);var F=(0,O.Q$)(z).sortedComponents,$=I.endDate?I.endDate.diff(I.startDate,"day"):0,U=[null==M||null===(t=M.address)||void 0===t?void 0:t.line1,null==M||null===(l=M.address)||void 0===l?void 0:l.city],V=[null==M||null===(p=M.address)||void 0===p?void 0:p.postalCode,null==M||null===(w=M.address)||void 0===w?void 0:w.state],K=function(e){var t=e.filter((function(e){return!!e&&"0"!==e})).join(", ");return t?a.createElement(n.ZP,{type:n.yG.Small},t):null},L=function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)};return a.createElement(E.Z,{open:e.isOpen,title:j(d.W.Misc.Summary),onClose:function(){return e.onClose?e.onClose():null},mobileFooter:a.createElement("div",{className:"row align-items-center"},a.createElement("div",{className:"col-4"},a.createElement(n.ZP,{type:n.yG.Body},j(d.W.Misc.Total)),a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Accent},a.createElement("strong",null,N.Z.pluralWithDictAndCount($,d.W.Misc.Night,j)))),a.createElement("div",{className:"col-8 u-flex u-flex-direction-column align-items-end"},a.createElement(m.Z,{bold:!0,size:"normal",align:i.P.Right},a.createElement(s.Z,null,I.getTotalPrice())),a.createElement(n.ZP,{color:o.Il.DarkGrey,type:n.yG.Small,align:i.P.Right},a.createElement("span",{className:"u-nowrap"},j(d.W.Step.Room.RoomInfo.IncludesTaxes)))))},a.createElement(a.Fragment,null,a.createElement("div",{className:"container"},a.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},a.createElement("div",{className:"col-6"},a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Grey},a.createElement("strong",null,j(d.W.Misc.CheckIn))),a.createElement(n.ZP,{type:n.yG.Small},j(d.W.Misc.After)," ",null==M?void 0:M.checkInTime)),a.createElement("div",{className:"col-6"},a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Grey},a.createElement("strong",null,j(d.W.Misc.CheckOut))),a.createElement(n.ZP,{type:n.yG.Small},j(d.W.Misc.Before)," ",null==M?void 0:M.checkOutTime))),a.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},a.createElement("div",{className:"col-8"},a.createElement("div",{className:"u-flex u-flex-flex-start"},a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",I.startDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},I.startDate?I.startDate.format("ddd, MMM D"):j(d.W.Step.Date.Arrival))),a.createElement("span",{className:"u-marg-left-right--light"},a.createElement(c.ZP,{icon:c.Tu.ArrowRight2,size:"18px",color:o.Il.DarkGrey})),a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",I.endDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},I.endDate?I.endDate.format("ddd, MMM D"):j(d.W.Step.Date.Departure)))),a.createElement(n.ZP,{type:n.yG.Small},I.getNumberOfAdults(!0),", ",I.getNumberOfChildren(!0),", ",I.getNumberOfRooms(!0))),a.createElement("div",{className:"col-4 u-align-right"},a.createElement(k.rU,{to:(0,C.Z)().getStepUrl()},a.createElement(S.Z,{onClick:function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)},size:"tiny"},j(d.W.Misc.Edit).toUpperCase())))),W&&W.length?a.createElement(a.Fragment,null,W.map((function(t,l){if(t.isValid())return a.createElement(v.Z,{row:t,index:l,key:t.getID(),showImages:!!e.showImages,onEditPropertyClicked:L})})),A.length>0&&a.createElement(a.Fragment,null,a.createElement(f.Z,{noMargins:!0,darker:!0}),a.createElement("div",{className:"u-marg-top"},a.createElement(n.ZP,{type:n.yG.Label,color:o.Il.DarkGrey},a.createElement("strong",null,"Add-on Items"))),A.map((function(e,t){return a.createElement(b.Z,{row:e,key:e.getID(),onRemoveClick:function(){return I.removeBasketAddonRow(e)}})})))):a.createElement("div",{className:"u-marg-bottom--heavy u-marg-top--heavy"},a.createElement("div",{className:"u-marg-bottom--heavy"},a.createElement(n.ZP,{type:n.yG.Body},j(d.W.Step.General.YourCartIsEmpty))),a.createElement("div",{style:{height:"150px",position:"relative"}},a.createElement(g.Z,null)),a.createElement("div",{className:"u-marg-top"},a.createElement("div",{className:"u-marg-bottom"},a.createElement(n.ZP,{bold:!0},null==M?void 0:M.name)),K(U),K(V))),F,a.createElement("div",{className:"u-marg-top--heavy u-marg-bottom--heavy"},a.createElement(Z.Z,null)))))}var I=l(1069),M=l(6061);function W(){var e=(0,a.useContext)(D.g7).screenSize,t=(0,a.useContext)(D.aN).currentStep,l=a.useContext(D.hy),y=(0,u.$)().t,E=(0,a.useState)(!1),f=(0,r.Z)(E,2),g=f[0],v=f[1];return e<=p.Z.Medium?a.createElement(a.Fragment,null,a.createElement("div",{className:"be-mobile-summary row u-border-bottom u-pad-top-bottom u-marg-bottom",onClick:function(){v(!0)}},a.createElement("div",{className:"col-8"},a.createElement("div",{className:"u-flex u-flex-flex-start"},a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",l.startDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},l.startDate?l.startDate.format("ddd, MMM D"):y(d.W.Step.Date.Arrival))),a.createElement("span",{className:"u-marg-left-right--light"},a.createElement(c.ZP,{icon:c.Tu.ArrowRight2,size:"18px",color:o.Il.DarkGrey})),a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",l.endDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},l.endDate?l.endDate.format("ddd, MMM D"):y(d.W.Step.Date.Departure)))),a.createElement(n.ZP,{type:n.yG.Small},l.getNumberOfAdults(!0),", ",l.getNumberOfChildren(!0),", ",l.getNumberOfRooms(!0))),a.createElement("div",{className:"col-4 u-flex u-flex-flex-end u-flex-align-center"},a.createElement(m.Z,{bold:!0,size:"normal",align:i.P.Right},t===M.Z?a.createElement(I.Z,{isMobile:!0}):a.createElement(s.Z,null,l.getTotalPrice())),a.createElement(c.ZP,{icon:c.Tu.Dropdown,size:"18px",color:o.Il.DarkGrey}))),a.createElement(w,{isOpen:g,onClose:function(){v(!1)}})):a.createElement(a.Fragment,null)}},513:function(e,t,l){l.d(t,{Z:function(){return s}});var r=l(7294),a=l(7754),n=l(584),o=l(7688),c=l(6793),m=l(9116),i=l(9478);function s(){var e=(0,o.WP)().hotel,t=(0,c.$)().t;return r.createElement("div",{className:"summary-privacy-policy"},r.createElement(n.ZP,{type:n.yG.Body},r.createElement("strong",null,t(i.W.Step.Confirmation.PrivacyPolicy))),r.createElement(n.ZP,{className:"u-marg-top--light",type:n.yG.Small,color:a.Il.DarkGrey},r.createElement(m.c,{i18nKey:i.W.Step.Confirmation.PrivacyPolicyDetail,components:[r.createElement("a",{key:0,href:null==e?void 0:e.policies,target:"_blank",style:{color:"var(--rs-color-accent-1)"},rel:"noreferrer"})]})))}}}]);
@@ -1 +1 @@
1
- (("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[446],{683:function(e,t,n){"use strict";n.d(t,{O:function(){return r}}),n(7294);var r=function(){throw new Error("The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")}},1639:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(7462),a=n(7294),o=n(4289),i=n(221),c=n(9874);function l(e,t){var n=0;return a.Children.map(e,(function(e){return a.isValidElement(e)?t(e,n++):e}))}var s=n(885),u=a.createContext({activeKey:"",lastIndex:0,currentIndex:0,onChange:function(){}}),p=function(e){var t=e.children,n=e.defaultActiveKey,r=e.onChange,o=(0,a.useState)(""),i=(0,s.Z)(o,2),c=i[0],l=i[1],p=(0,a.useState)(0),f=(0,s.Z)(p,2),d=f[0],b=f[1],v=(0,a.useState)(0),m=(0,s.Z)(v,2),h=m[0],y=m[1],w={activeKey:c,lastIndex:d,currentIndex:h,onChange:function(e,t){null==r||r(e),b(h),y(t),l(e)}};return(0,a.useEffect)((function(){l(n)}),[]),a.createElement(u.Provider,{value:w},t)},f=n(4942),d=n(4184),b=n.n(d),v=n(6550),m=n(3727),h=n(584),y=n(7754),w=n(2566);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function(e){var t=(0,a.useContext)(u),n=(0,v.k6)().location,r=(0,w.J)(),o=e.title,i=e.navPath,c=e.disabled,l=e.index;if(!o)return null;var s=C(C({},n),{},{pathname:i});return a.createElement("li",null,a.createElement(m.OL,{to:s,isActive:function(e,t){return!c&&t.pathname.endsWith(i)},activeClassName:"active",className:b()("c-nav-item ",{disabled:c}),onClick:function(e){e.preventDefault(),c||(r(i),t.onChange(i,l))}},a.createElement("span",{className:b()("c-nav-link")},a.createElement(h.ZP,{color:y.Il.DarkGrey,bold:!0},o))))},A=n(8144);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e){var t=e.children,n=(0,a.useContext)(u),r=(0,v.k6)().location,o=(0,A.Yz)(n.activeKey,{from:{opacity:0,position:"absolute"},to:{opacity:1,position:"relative"},enter:{opacity:1,position:"relative"},leave:{opacity:0,position:"absolute"},config:{friction:25}}),i=P(P({},r),{},{pathname:t[0].props.navPath});return a.createElement("div",{className:"u-pos-rel"},o((function(e){return a.createElement(A.q.div,{style:P({left:0,right:0},e)},a.createElement(v.rs,null,l(t,(function(e){return a.createElement(v.AW,{path:e.props.navPath},e.props.children)})),a.createElement(v.AW,{path:"*"},a.createElement(v.l_,{to:i,push:!1}))))})))}var j=n(6625),D=n.n(j),k={slidesPerView:"auto",allowTouchMove:!0,spaceBetween:32,noSwiping:!1},x=function(e){var t=(0,o.Ch)(e,{activeKey:"onSelect"}),n=t.onSelect,s=t.children,u=t.variant,f=void 0===u?"tabs":u,d=t.activeKey,b=void 0===d?null:d,v=t.fullBleedOnLineBreak,m=void 0===v||v;return a.createElement(p,{defaultActiveKey:b||"",onChange:n},a.createElement("ul",{className:"c-nav c-nav-".concat(f," ").concat(D().tabCarousel)},a.createElement(i.tq,k,l(s,(function(e,t){return a.createElement(i.o5,{key:t},a.createElement(g,(0,r.Z)({index:t},e.props),e))})))),a.createElement(c.Z,{noMargins:!0,fullBleed:m}),a.createElement(_,null,e.children))}},2695:function(e,t,n){(t=n(3645)(!0)).push([e.id,".tabs-module__tabCarousel___2yGDn{width:100%}.tabs-module__tabCarousel___2yGDn .swiper{width:100%;overflow:visible}.tabs-module__tabCarousel___2yGDn .swiper .swiper-wrapper .swiper-slide{width:auto}","",{version:3,sources:["tabs.module.scss"],names:[],mappings:"AAAA,kCAAa,UAAU,CAAC,0CAA6B,UAAU,CAAC,gBAAgB,CAAC,wEAA2D,UAAU",file:"tabs.module.scss",sourcesContent:[".tabCarousel{width:100%}.tabCarousel :global .swiper{width:100%;overflow:visible}.tabCarousel :global .swiper .swiper-wrapper .swiper-slide{width:auto}"]}]),t.locals={tabCarousel:"tabs-module__tabCarousel___2yGDn"},e.exports=t},6625:function(e,t,n){var r=n(3379),a=n(2695);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}}}]);
1
+ (("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[446],{683:function(e,t,n){"use strict";n.d(t,{O:function(){return r}}),n(7294);var r=function(){throw new Error("The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")}},1639:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(7462),a=n(7294),o=n(4289),i=n(221),c=n(9874);function l(e,t){var n=0;return a.Children.map(e,(function(e){return a.isValidElement(e)?t(e,n++):e}))}var s=n(885),u=a.createContext({activeKey:"",lastIndex:0,currentIndex:0,onChange:function(){}}),p=function(e){var t=e.children,n=e.defaultActiveKey,r=e.onChange,o=(0,a.useState)(""),i=(0,s.Z)(o,2),c=i[0],l=i[1],p=(0,a.useState)(0),f=(0,s.Z)(p,2),d=f[0],b=f[1],v=(0,a.useState)(0),m=(0,s.Z)(v,2),h=m[0],y=m[1],w={activeKey:c,lastIndex:d,currentIndex:h,onChange:function(e,t){null==r||r(e),b(h),y(t),l(e)}};return(0,a.useEffect)((function(){l(n)}),[]),a.createElement(u.Provider,{value:w},t)},f=n(4942),d=n(4184),b=n.n(d),v=n(6550),m=n(3727),h=n(584),y=n(7754),w=n(2566);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function(e){var t=(0,a.useContext)(u),n=(0,v.k6)().location,r=(0,w.J)(),o=e.title,i=e.navPath,c=e.disabled,l=e.index,s=e.preventScrollTop;if(!o)return null;var p=C(C({},n),{},{pathname:i});return a.createElement("li",null,a.createElement(m.OL,{to:p,isActive:function(e,t){return!c&&t.pathname.endsWith(i)},activeClassName:"active",className:b()("c-nav-item ",{disabled:c}),onClick:function(e){e.preventDefault(),c||(r(i,s),t.onChange(i,l))}},a.createElement("span",{className:b()("c-nav-link")},a.createElement(h.ZP,{color:y.Il.DarkGrey,bold:!0},o))))},A=n(8144);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,f.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e){var t=e.children,n=(0,a.useContext)(u),r=(0,v.k6)().location,o=(0,A.Yz)(n.activeKey,{from:{opacity:0,position:"absolute"},to:{opacity:1,position:"relative"},enter:{opacity:1,position:"relative"},leave:{opacity:0,position:"absolute"},config:{friction:25}}),i=P(P({},r),{},{pathname:t[0].props.navPath});return a.createElement("div",{className:"u-pos-rel"},o((function(e){return a.createElement(A.q.div,{style:P({left:0,right:0},e)},a.createElement(v.rs,null,l(t,(function(e){return a.createElement(v.AW,{path:e.props.navPath},e.props.children)})),a.createElement(v.AW,{path:"*"},a.createElement(v.l_,{to:i,push:!1}))))})))}var j=n(6625),D=n.n(j),k={slidesPerView:"auto",allowTouchMove:!0,spaceBetween:32,noSwiping:!1},x=function(e){var t=(0,o.Ch)(e,{activeKey:"onSelect"}),n=t.onSelect,s=t.children,u=t.variant,f=void 0===u?"tabs":u,d=t.activeKey,b=void 0===d?null:d,v=t.fullBleedOnLineBreak,m=void 0===v||v;return a.createElement(p,{defaultActiveKey:b||"",onChange:n},a.createElement("ul",{className:"c-nav c-nav-".concat(f," ").concat(D().tabCarousel)},a.createElement(i.tq,k,l(s,(function(e,t){return a.createElement(i.o5,{key:t},a.createElement(g,(0,r.Z)({index:t},e.props),e))})))),a.createElement(c.Z,{noMargins:!0,fullBleed:m}),a.createElement(_,null,e.children))}},2695:function(e,t,n){(t=n(3645)(!0)).push([e.id,".tabs-module__tabCarousel___2yGDn{width:100%}.tabs-module__tabCarousel___2yGDn .swiper{width:100%;overflow:visible}.tabs-module__tabCarousel___2yGDn .swiper .swiper-wrapper .swiper-slide{width:auto}","",{version:3,sources:["tabs.module.scss"],names:[],mappings:"AAAA,kCAAa,UAAU,CAAC,0CAA6B,UAAU,CAAC,gBAAgB,CAAC,wEAA2D,UAAU",file:"tabs.module.scss",sourcesContent:[".tabCarousel{width:100%}.tabCarousel :global .swiper{width:100%;overflow:visible}.tabCarousel :global .swiper .swiper-wrapper .swiper-slide{width:auto}"]}]),t.locals={tabCarousel:"tabs-module__tabCarousel___2yGDn"},e.exports=t},6625:function(e,t,n){var r=n(3379),a=n(2695);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);r(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}}}]);