1(window.webpackJsonp=window.webpackJsonp||[]).push([[65,64],{1141:function(t,e,n){t.exports=n.p+"room-gray.b09392f9d48cc9964be2203c145d593a.svg"},1308:function(t,e,n){},1418:function(t,e,n){"use strict";n(1308)},1547:function(t,e,n){},1690:function(t,e,n){t.exports=n.p+"close-big.960d921bedc709b7436d1e6583896687.svg"},1691:function(t,e,n){"use strict";n(1547)},878:function(t,e,n){"use strict";n.r(e);var r={name:"RecommenderSkeletonLoading",components:{VueSkeletonLoader:n(329).a},data:function data(){var t=window.innerWidth>=768;return{widthList:t?[165,145,170,135,95]:[125,130,120,95],loaderList:[],isDesktop:t}},mounted:function mounted(){var t=Math.floor(this.$refs.planContainer.clientWidth/(window.innerWidth>=768?238:166));this.loaderList=new Array(t).fill(0)}},i=(n(1418),n(33)),o=Object(i.a)(r,(function render(){var t=this,e=t._self._c;return e("div",{ref:"planContainer",staticClass:"d-flex gap-8px justify-content-center"},t._l(t.loaderList,(function(n,r){return e("div",{key:r,staticClass:"plan-block"},[e("vue-skeleton-loader",{attrs:{type:"rect",width:t.isDesktop?228:158,he
1ight:t.isDesktop?152:106,animation:"wave"}}),t._v(" "),e("div",{staticClass:"px-3 py-3"},[t._l(t.widthList,(function(t,n){return e("vue-skeleton-loader",{key:n,staticClass:"mb-2",attrs:{type:"rect",width:t,height:17,animation:"wave",rounded:""}})})),t._v(" "),e("vue-skeleton-loader",{staticClass:"mt-4 mb-2",attrs:{type:"rect",width:60,height:17,animation:"wave",rounded:""}})],2)],1)})),0)}),[],!1,null,"392b6e5a",null);e.default=o.exports},910:function(t,e,n){"use strict";n.r(e);var r=n(202),i=n(205),o=n(975),a=n(33),c=Object(a.a)({},(function render(){var t=this._self._c;return t("svg",this._g({attrs:{width:"36",height:"36",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},this.$listeners),[t("mask",{staticStyle:{"mask-type":"alpha"},attrs:{id:"a",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"36",height:"36"}},[t("path",{attrs:{transform:"rotate(-180 36 36)",fill:"#D9D9D9",d:"M36 36h36v36H36z"}})]),t("g",{attrs:{mask:"url(#a)"}},[t("path",{attrs:{fill:"#141617",d:"M8 8h20v20H8z"}}),t("path",{attrs:{d:"M16.988 18l4.612-4.613-2.1-2.137L12.75 18l6.75 6.75 2.1-2.137L16.987 18zM18 3c2.075 0 4.025.394 5.85 1.181 1.825.788 3.412 1.856 4.762 3.207 1.35 1.35 2.42 2.937 3.207 4.762C32.606 13.975 33 15.925 33 18c0 2.075-.394 4.025-1.181 5.85-.788 1.825-1.857 3.412-3.206 4.762-1.35 1.35-2.938 2.42-4.763 3.207C22.025 32.606 20.075 33 18 33c-2.075 0-4.025-.394-5.85-1.181-1.825-.788-3.412-1.857-4.763-3.206-1.35-1.35-2.418-2.938-3.206-4.763C3.394 22.025 3 20.075 3 18c0-2.075.394-4.025 1.181-5.85.788-1.825 1.856-3.412 3.207-4.763 1.35-1.35 2.937-2.418 4.762-3.206C13.975 3.394 15.925 3 18 3z",fill:"#fff"}})])])}),[],!1,null,null,null).exports,s=n(40),l=n(855),d=n.n(l),u=n(31),h=n(878),_=n(244);function _slicedToArray(t,e){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function asyncGeneratorStep(t,e,n,r,i,o,a){try{var c=t[o](a),s=c.value}catch(l){return void n(l)}c.done?e(s):Promise.resolve(s).then(r,i)}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(n,!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m,f=window.innerWidth>=768?238:166,p={name:"RecommenderWidget",components:{CircleArrow:c,RecommenderSkeletonLoading:h.default},data:function data(){return{widgetSettings:{},recommendationMeta:{},recommendations:[],showArrow:!1,isLoading:!0,showPreviewBanner:!!this.$route.query.preview_button_color,impressionSent:!1,hoverSent:!1,previewButtonColor:this.$route.query.preview_button_color?"#".concat(this.$route.query.preview_button_color):null,chatbotColor:this.$route.query.chatbot_color?"#".concat(this.$route.query.chatbot_color):null,faqId:this.$route.query.faq_id}},computed:_objectSpread({},Object(s.d)({initialSetting:"setting/getInit",hotelCode:"setting/getHotelCode",isSignedIn:"membership/isSignedIn"}),{planBaseLink:function planBaseLink(){var t,e=this.$store.getters["setting/getSetting"],n=e.parentUrl,r=e.parentPathname;return(null===(t=this.initialSetting.standalone_settings)||void 0===t?void 0:t.url)?"".concat(this.initialSetting.standalone_settings.url,"/booking/result?code=").concat(this.hotelCode,"&order=price_low_to_high"):"".concat(n||this.initialSetting.hotel_url).concat(r,"?tripla_booking_widget_open=search&code=").concat(this.hotelCode,"&result_order=price_low_to_high")},buttonText:function buttonText(){var t,e,n=this;return(null===(t=this.widgetSettings.translations_attributes)||void 0===t||null===(e=t.find((function(t){return t.locale===n.$i18n.locale})))||void 0===e?void 0:e.button_text)||this.$t("bookingResult.book")},buttonStyle:function buttonStyle(){var t,e=this.chatbotColor||this.previewButtonColor||(null===(t=this.widgetSettings)||void 0===t?void 0:t.button_color)||"#c21e58";return{background:e,color:Object(_.a)(e)}}}),created:(m=function _asyncToGenerator(t){return function(){var e=this,n=arguments;
1return new Promise((function(r,i){var o=t.apply(e,n);function _next(t){asyncGeneratorStep(o,r,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(o,r,i,_next,_throw,"throw",t)}_next(void 0)}))}}(regeneratorRuntime.mark((function _callee(){var t,e,n,o,a=this;return regeneratorRuntime.wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Promise.all([r.a.get({type:"recommendation",search_type:"undated"}),i.a.getRecommenderWidgetSetting(this.hotelCode)]);case 2:return t=c.sent,e=_slicedToArray(t,2),n=e[0],o=e[1].data,this.recommendations=n.recommendations.map((function(t){return _objectSpread({},t,{link:"".concat(a.planBaseLink,"&hotel_plan_code=").concat(t.hotel_plan_code,"&is_including_occupied=true&utm_source=tripla_bot&utm_medium=").concat(a.faqId?"recommender_message_rich":"recommender_widget")+(a.faqId?"&utm_campaign=".concat(a.faqId):"")+(a.initialSetting.undated_search_enabled?"&search_type=undated":"&checkin=".concat(t.room_rate[0].date))})})),this.recommendationMeta=n.recommendation_meta_data,this.widgetSettings=o,this.isLoading=!1,c.next=12,this.$nextTick();case 12:this.handleResize(),this.createObserver(),0===this.recommendations.length&&Object(u.q)({action:"close-recommender-widget"});case 15:case"end":return c.stop()}}),_callee,this)}))),function created(){return m.apply(this,arguments)}),mounted:function mounted(){window.addEventListener("resize",this.handleResize)},beforeDestroy:function beforeDestroy(){window.removeEventListener("resize",this.handleResize)},methods:{getPrice:function getPrice(t){return Object(o.c)((this.isSignedIn?this.getUserPrice(t.sign_in_discount):this.getUserPrice(t.non_sign_in_discount))||t.total_price+t.tax+t.accommodation_tax)},getUserPrice:function getUserPrice(t){return t.total_price_after_discount+t.total_price_after_discount_tax+t.total_accommodation_tax},scrollToRight:function scrollToRight(){var t=Math.floor(window.innerWidth/f);this.$refs.planScroll.scrollLeft+=t*f},scrollToLeft:function scrollToLeft(){var t=Math.floor(window.innerWidth/f);this.$refs.planScroll.scrollLeft-=t*f},handleResize:d()((function(){this.showArrow=this.$refs.planScroll.scrollWidth>this.$refs.planScroll.clientWidth}),500),sendGa4Event:function sendGa4Event(t,e){Object(u.q)({action:"ga4Event",event:t,payload:_objectSpread({event_category:"recommender_widget",value:1},e,{},this.recommendationMeta,{faq_id:this.faqId||void 0,ga_session_id:Object(u.d)()})})},handleClickRecommenderWidgetEvent:function handleClickRecommenderWidgetEvent(t){this.sendGa4Event("recommender_widget_click",_objectSpread({event_label:"Recommender Widget Clicks"},t))},handleHoverEvent:function handleHoverEvent(){this.hoverSent||this.sendGa4Event("recommender_widget_hover",{event_label:"Recommender Widget Hover"}),this.hoverSent=!0},createObserver:function createObserver(){var t=this,e=new IntersectionObserver((function(e,n){e.forEach((function(e){e.isIntersecting&&!t.impressionSent&&t.handleVisibilityChange()}))}),{root:null,rootMargin:"0px",threshold:.5}),n=this.$refs.observerElement;n&&e.observe(n)},handleVisibilityChange:function handleVisibilityChange(){this.sendGa4Event("recommender_widget_visible",{event_label:"Recommender Widget Impressions"}),this.impressionSent=!0}}},v=(n(1691),Object(a.a)(p,(function render(){var t=this,e=t._self._c;return e("div",{ref:"observerElement",staticClass:"plan-container"},[t.recommendations.length&&t.showArrow?e("span",{staticClass:"circle left-arrow",on:{click:t.scrollToLeft}},[e("circle-arrow")],1):t._e(),t._v(" "),t.isLoading?e("recommender-skeleton-loading"):e("div",{ref:"planScroll",staticClass:"plan-scroll-view",class:{"justify-content-center":!t.showArrow},on:{mouseover:t.handleHoverEvent}},t._l(t.recommendations,(function(r){return e("a",{key:r.id,staticClass:"plan-block",attrs:{href:r.link,target:"_blank","data-cy":"plan-".concat(r.hotel_plan_code,"-").concat(r.sleeps)},on:{click:function click(e){return t.handleClickRecommenderWidgetEvent({hotel_plan_code:r.hotel_plan_code})}}},[e("img",{staticClass:"room-photo",attrs:{src:r.url_plan_pictures[0],alt:"Image of ".concat(r.room_plan_name)}}),t._v(" "),e("div",{staticClass:"content"},[e("strong",{staticClass:"price",attrs:{"data-cy":"price-".concat(r.id)}},[t._v("\n "+t._s(t.getPrice(r))+"\n "),t.initialSetting.undated_search_enabled?e("span",[t._v("~")]):t._e(),t._v(" "),e("span",{staticClass:"tax"},[t._v("("+t._s(t.$t("bookingResult.taxIncluded"))+")")])]),t._v(" "),e("div",{staticClass:"room-info"},[e("img",{staticClass:"mr-2",attrs:{src:n(987),alt:""}}),e("strong",{staticClass:"align-middle",attrs:{"data-cy":"adults-".concat(r.id)}},[t._v(t._s(r.matched_search_criteria.adults_count))]),t._v(" "),e("img",{staticClass:"mx-2",attrs:{src:n(1141),alt:""}}),e("strong",{staticClass:"align-middle",attrs:{"data-cy":"rooms-".concat(r.id)}},[t._v("1")])]),t._v(" "),e("p",{staticClass:"plan-name",attrs:{"data-cy":"room-plan-name-".concat(r.id)}},[t._v("\n "+t._s(r.room_plan_name)+"\n ")]),t._v(" "),e("button",{staticClass:"book-button",style:t.buttonStyle,attrs:{"data-cy":"book-".concat(r.id)}},[t._v("\n "+t._s(t.faqId?t.$t("base.bookNow"):t.buttonText)+"\n ")])])])})),0),t._v(" "),t.recommendations.length&&t.showArrow?e("span",{staticClass:"circle right-arrow",on:{click:t.scrollToRight}},[e("circle-arrow")],1):t._e(),t._v(" "),t.showPreviewBanner?e("div",{staticClass:"preview-notice"},[t._v("\n "+t._s(t.$t("recommenderWidget.previewText"))),e("img",{staticClass:"close",attrs:{src:n(1690)},on:{click:function click(e){t.showPreviewBanner=!1}}})]):t._e()],1)}),[],!1,null,"d95a58a2",null));e.default=v.exports},975:function(t,e,n){"use strict";n.d(e,"a",(function(){return priceWithPrefix})),n.d(e,"b",(function(){return priceWithComma})),n.d(e,"c",(function(){return a}));var r=n(8),i=n(83);function _slicedToArray(t,e){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(t,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to de
1structure non-iterable instance")}()}var o=function purePriceWithPrefix(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Â¥";if(0!==t&&!Number(t))return t;var n=t<0?"-":"";return"".concat(n).concat(e).concat(Math.abs(t).toFixed(0).replace(/\d(?=(\d{3})+$)/g,"$&,"))};function priceWithPrefix(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.a.getters["setting/getCurrency"].symbol;return o(t,e)}function priceWithComma(t){if(0===t||Number(t))return Number(t).toFixed(0).replace(/\d(?=(\d{3})+$)/g,"$&,")}var a=function priceWithSymbol(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.a.getters["mcp/selectedCurrency"];if(!i.c[e])return String(t);var n=i.c[e],o=n.symbol,a=n.decimalDigits,c=t/Math.pow(10,a),s=String(c).split("."),l=_slicedToArray(s,2),d=l[0],u=l[1],h=void 0===u?"":u,_=Number(d).toLocaleString(),m=a?".".concat(h.padEnd(a,0)):"";return"".concat(o," ").concat(_).concat(m)}},987:function(t,e,n){t.exports=n.p+"people-gray.faca7bf359b57d4f5315b9e323fa4154.svg"}}]); 2//# sourceMappingURL=page-RecommenderWidget-index-vue.25a0c40130490781546b.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.