!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e1403e92-1db7-480e-97ab-139461873cec",t._sentryDebugIdIdentifier="sentry-dbid-e1403e92-1db7-480e-97ab-139461873cec")}catch(t){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"ssrplatform_20240726_2918de7a"},(window.webpackJsonp=window.webpackJsonp||[]).push([["0e0ea1"],{"+BCORp":function(t,e,o){"use strict";o.r(e),o.d(e,"ExploreDestination",(function(){return _}));var n=o("ba5pHD");o.d(e,"SearchBoxRecommend",(function(){return n.b}));var i=o("YKMjgm"),r=(o("bGeixE"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.show=!1,e.popoverStyles={},e.arrowStyles={},e}return Object(n.c)(e,t),e.prototype.onShowChange=function(t){var e=this;t&&this.$nextTick((function(){e.setStyles()})),this.$emit(t?"enter":"leave")},e.prototype.mounted=function(){var t=this;document.addEventListener("click",(function(){t.$refs.popover&&t.handleContentClick()}))},e.prototype.destroyed=function(){window.clearTimeout(this.timerId)},e.prototype.setStyles=function(){var t=this.offset,e=this.arrowOffset,o=this.$el,n=o.offsetWidth,i={width:this.width?"".concat(this.width,"px"):"auto",height:this.height?"".concat(this.height,"px"):"auto",top:"".concat(this.top,"px"),transform:"translate(".concat(-this.right,"px,0)")},r={transform:"translate(".concat(this.right,"px,0)")};if("left"===this.align&&(i.left="".concat(o.offsetLeft+t,"px"),r.left="".concat(n/2-10+e,"px")),"right"===this.align){var a=this.width?this.width:this.getPopoverWidth();i.left="".concat(o.offsetWidth+o.offsetLeft-a+t,"px"),r.right="".concat(n/2-10-e,"px")}if("center"===this.align){var s=(a=this.width?this.width:this.getPopoverWidth())/2,c=n/2,d=o.offsetLeft-s+c;i.left="".concat(d+t,"px"),r.left="".concat(s-10+e,"px")}this.popoverStyles=i,this.arrowStyles=r},e.prototype.getPopoverWidth=function(){var t=this.getStyles(this.$refs.popover);return Number.parseFloat(t.width||"0")},e.prototype.getStyles=function(t){return window.getComputedStyle(t)},e.prototype.handleClick=function(){var t=this;window.clearTimeout(this.timerId),this.timerId=window.setTimeout((function(){t.show=!t.show}),200)},e.prototype.handleContentClick=function(){this.show=!1},Object(n.d)([Object(i.Prop)()],e.prototype,"width",void 0),Object(n.d)([Object(i.Prop)()],e.prototype,"height",void 0),Object(n.d)([Object(i.Prop)({default:"center"})],e.prototype,"align",void 0),Object(n.d)([Object(i.Prop)({default:0})],e.prototype,"offset",void 0),Object(n.d)([Object(i.Prop)({default:0})],e.prototype,"right",void 0),Object(n.d)([Object(i.Prop)({default:0})],e.prototype,"arrowOffset",void 0),Object(n.d)([Object(i.Prop)({default:64})],e.prototype,"top",void 0),Object(n.d)([Object(i.Watch)("show")],e.prototype,"onShowChange",null),e=Object(n.d)([i.Component],e)}(i.Vue)),a=r,s=Object(n.e)({render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"header-popover",on:{click:t.handleClick}},[t._t("trigger"),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],ref:"popover",staticClass:"header-popover_container",style:t.popoverStyles,on:{click:function(e){return e.stopPropagation(),t.handleContentClick(e)}}},[o("i",{staticClass:"header-popover_arrow",style:t.arrowStyles}),t._v(" "),t._t("content")],2)],2)},staticRenderFns:[]},undefined,a,undefined,false,undefined,!1,void 0,void 0,void 0),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.c)(e,t),Object(n.d)([Object(i.Prop)({default:!1})],e.prototype,"visible",void 0),e=Object(n.d)([i.Component],e)}(i.Vue),d=c,l=Object(n.e)({render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"search-box-loading"},[o("div",{staticClass:"search-box-loading_spin"})])},staticRenderFns:[]},undefined,d,undefined,false,undefined,!1,void 0,void 0,void 0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.c)(e,t),e=Object(n.d)([Object(i.Component)({name:"LocationSvg"})],e)}(i.Vue),p=u,f=Object(n.e)({render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",viewBox:"0 0 20 20"}},[o("path",{attrs:{"fill-rule":"evenodd",d:"M12.51 8.935a2.507 2.507 0 11-5.014 0 2.507 2.507 0 015.013 0zm-1.4 0a1.107 1.107 0 11-2.214 0 1.107 1.107 0 012.213 0z","clip-rule":"evenodd"}}),t._v(" "),o("path",{attrs:{"fill-rule":"evenodd",d:"M17 9c0 4.26-4.321 7.563-6.173 8.783a1.492 1.492 0 01-1.654 0C7.321 16.563 3 13.26 3 9a7 7 0 0114 0zm-1.4 0c0 1.65-.843 3.224-2.05 4.613-1.194 1.376-2.62 2.426-3.494 3a.1.1 0 01-.056.02.1.1 0 01-.056-.02c-.873-.574-2.3-1.624-3.495-3C5.243 12.224 4.4 10.65 4.4 9a5.6 5.6 0 0111.2 0z","clip-rule":"evenodd"}})])},staticRenderFns:[]},undefined,p,undefined,false,undefined,!1,void 0,void 0,void 0),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showPopover=!1,e.isLoadRecommend=!1,e.loading=!1,e.resolvedData=!1,e.recommendData={destinations:[],regions:[]},e}return Object(n.c)(e,t),e.prototype.getRecommendData=function(){var t=this;this.resolvedData||(this.resolvedData=!0,this.loading=!0,this._axios.$get("/v1/usrcsrv/destination/guide").then((function(e){e.success&&e.result?(t.recommendData={destinations:e.result.destination_guide_menu_list,hotCities:e.result.popular_area_list},t.loading=!1):t.resolvedData=!1})).catch((function(){t.resolvedData=!1})))},e.prototype.handleEnter=function(){var t=this;window.clearTimeout(this.timerId),this.timerId=window.setTimeout((function(){t.getRecommendData(),t.showPopover=!0,t.isLoadRecommend=!0,t.$emit("handle-enter")}),200)},e.prototype.handleLeave=function(){var t=this;window.clearTimeout(this.timerId),this.timerId=window.setTimeout((function(){t.showPopover=!1}),200)},e.prototype.handleContentClick=function(){this.showPopover=!1},e=Object(n.d)([Object(i.Component)({components:{Recommend:function(){return o.e("a51fbd").then(o.bind(null,"4qFr1/")).then((function(t){return t.default||t}))},Loading:l,Popover:s,LocationSvg:f}})],e)}(n.a),v=h,_=Object(n.e)({render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"destination-box",attrs:{id:"js-header-destination-box"},on:{mouseenter:t.handleEnter,mouseleave:t.handleLeave}},[t._t("default",[o("div",{staticClass:"destination-box_button"},[o("LocationSvg"),t._v(" "),o("span",{attrs:{id:"js-destination-box-text"}},[t._v(t._s(t.langData.explore_destinations))])],1)]),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.showPopover,expression:"showPopover"}],staticClass:"destination-box_popover",attrs:{id:"destination-box_popover"},on:{click:t.handleContentClick}},[t.isLoadRecommend?o("Recommend",{attrs:{data:t.recommendData,"lang-data":t.langData,"data-spm-module":"ChangeDestination.Destination"}}):t._e(),t._v(" "),o("Loading",{attrs:{visible:t.loading}})],1)],2)},staticRenderFns:[]},undefined,v,undefined,false,undefined,!1,void 0,void 0,void 0);e.default=_},bGeixE:function(t,e,o){"use strict";t.exports=function(t){var e=/https?:\/\/(www.)?klook.com+/gi,o=/blog/.test(t);return e.test(t)&&!o&&(t=t.replace(e,"")),t}},ba5pHD:function(t,e,o){"use strict";o.d(e,"a",(function(){return l})),o.d(e,"b",(function(){return _})),o.d(e,"c",(function(){return s})),o.d(e,"d",(function(){return c})),o.d(e,"e",(function(){return d}));var n=o("YKMjgm"),i=o("bGeixE"),r=o.n(i),a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},a(t,e)};function s(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function c(t,e,o,n){var i,r=arguments.length,a=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,o,a):i(e,o))||a);return r>3&&a&&Object.defineProperty(e,o,a),a}var d=function(t,e,o,n,i,r,a,s,c,d){"boolean"!==typeof a&&(c=s,s=a,a=!1);var l,u="function"===typeof o?o.options:o;if(t&&t.render&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),n&&(u._scopeId=n),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):e&&(l=a?function(t){e.call(this,d(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),l)if(u.functional){var p=u.render;u.render=function(t,e){return l.call(e),p(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,l):[l]}return o},l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.sendGTMCustomEvent=function(t){var e,o,n,i;return(null===(o=null===(e=this.tracker)||void 0===e?void 0:e.gtm)||void 0===o?void 0:o.sendGTMCustomEvent(t))||(null===window||void 0===window?void 0:window.tracker)&&(null===(i=null===(n=null===window||void 0===window?void 0:window.tracker)||void 0===n?void 0:n.gtm)||void 0===i?void 0:i.sendGTMCustomEvent(t))},e.prototype.beforeMount=function(){this._axios=this.$attrs.axios||window.$axios},c([Object(n.Prop)({type:Object,default:function(){}})],e.prototype,"langData",void 0),c([Object(n.Prop)({type:Object})],e.prototype,"tracker",void 0),e=c([Object(n.Component)({})],e)}(n.Vue),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.sendData=function(t){this.sendGTMCustomEvent("Explore by City Navigation Box | Navigation Box Destination Chosen | ".concat(t)),this.sendGTMCustomEvent("Navigation Bar Search Box|Search Bar Listed Hot Destination Clicked")},e.prototype.spm=function(t){return"__default?typ=entry&oid=klook_id_".concat(t.klook_id,"&ext=").concat(JSON.stringify({LinkURL:encodeURIComponent(t.klook_area_url)}))},e.prototype.replaceUrlHost=function(t){return r()(t)},c([Object(n.Prop)({default:function(){return[]}})],e.prototype,"countries",void 0),e=c([n.Component],e)}(l),p=d({render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"area-selector"},["select_country_region"!==t.langData.select_country_region?o("div",{staticClass:"area-selector_label"},[t._v("\n "+t._s(t.langData.select_country_region)+"\n ")]):t._e(),t._v(" "),o("ul",{staticClass:"area-selector_list"},t._l(t.countries,(function(e,n){return o("li",{key:""+e.klook_id+n},[o("b",{staticClass:"area-selector_country"},[o("a",{attrs:{href:t.replaceUrlHost(e.klook_area_url),"data-spm-item":t.spm(e),"data-country-id":e.klook_id}},[t._v(t._s(e.klook_area_name))])]),t._v(" "),o("div",{staticClass:"area-selector_cities"},t._l(e.leaf_menu_list||[],(function(e,n){return o("a",{key:""+e.klook_id+n,attrs:{"data-spm-item":t.spm(e),href:t.replaceUrlHost(e.klook_area_url),"data-city-id":e.klook_id},on:{click:function(o){return t.sendData(e.klook_id)}}},[t._v(t._s(e.klook_area_name))])})),0)])})),0)])},staticRenderFns:[]},undefined,u,undefined,false,undefined,!1,void 0,void 0,void 0),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.replaceUrlHost=r.a,e}return s(e,t),e.prototype.spm=function(t){return"__default?typ=entry&oid=klook_id_".concat(t.klook_id,"&ext=").concat(JSON.stringify({LinkURL:encodeURIComponent(t.klook_area_url)}))},e.prototype.sendData=function(t){this.sendGTMCustomEvent("Explore by City Navigation Box|Navigation Box Popular Destination Chosen|".concat(t)),this.sendGTMCustomEvent("Navigation Bar Search Box|Search Bar Listed Destination Clicked")},c([Object(n.Prop)({default:function(){return[]}})],e.prototype,"cities",void 0),e=c([n.Component],e)}(l),h=d({render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ul",{staticClass:"hot-destinations"},t._l(t.cities,(function(e,n){return o("li",{key:""+e.klook_id+n},[o("a",{directives:[{name:"lazy",rawName:"v-lazy:background-image.container",value:e.image_url,expression:"city.image_url",arg:"background-image",modifiers:{container:!0}}],staticClass:"hot-destinations_link",attrs:{"data-spm-item":t.spm(e),href:t.replaceUrlHost(e.klook_area_url),"data-img-type":"hotDestinationsImg"},on:{click:function(o){return t.sendData(e.klook_id)}}},[o("span",{staticClass:"hot-destinations_name"},[t._v(t._s(e.klook_area_name))])])])})),0)},staticRenderFns:[]},undefined,f,undefined,false,undefined,!1,void 0,void 0,void 0),v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.active=0,e.hasMore=!1,e}return s(e,t),Object.defineProperty(e.prototype,"groups",{get:function(){var t=this.data.destinations,e=[{area:this.langData.desktop_index_hotdest,subareas:[]}];return(this.showHotDestination?e:[]).concat(t.slice(0,6).map((function(t){return{area:t.menu_name,subareas:Array.isArray(t.popular_area_name_list)?t.popular_area_name_list.slice(0,2):[]}})))},enumerable:!1,configurable:!0}),e.prototype.areaSelectorActive=function(t){return this.showHotDestination?this.active===t+1:this.active===t},e.prototype.initViewMore=function(){var t=this.$box,e=t.scrollHeight,o=t.clientHeight;this.hasMore=e-o>0},e.prototype.handleMouseEnter=function(t){var e=this;window.clearTimeout(this.timer),this.timer=window.setTimeout((function(){e.active=t,e.$nextTick((function(){e.initViewMore()}))}),100)},e.prototype.handleMouseLeave=function(){window.clearTimeout(this.timer)},e.prototype.handleBoxScroll=function(){var t=this.$box,e=t.scrollTop,o=t.scrollHeight,n=t.clientHeight;this.hasMore=o-e>n+2},c([Object(n.Ref)("box")],e.prototype,"$box",void 0),c([Object(n.Prop)({default:function(){return{destinations:[],hotCities:[]}}})],e.prototype,"data",void 0),c([Object(n.Prop)({default:!0})],e.prototype,"showHotDestination",void 0),e=c([Object(n.Component)({components:{HotDestinations:h,AreaSelector:p}})],e)}(l),_=d({render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"search-box-recommend"},[o("div",{staticClass:"search-box-recommend_left"},[o("ul",{staticClass:"search-box-recommend_groups"},t._l(t.groups,(function(e,n){return o("li",{key:e.area+n,class:{active:t.active===n},on:{mouseenter:function(e){return t.handleMouseEnter(n)},mouseleave:t.handleMouseLeave}},[o("b",{staticClass:"search-box-recommend_area"},[t._v(t._s(e.area))]),t._v(" "),e.subareas.length?o("div",{staticClass:"search-box-recommend_cities"},t._l(e.subareas,(function(e){return o("span",{key:e},[t._v(t._s(e))])})),0):t._e()])})),0)]),t._v(" "),o("div",{ref:"box",staticClass:"search-box-recommend_right",on:{scroll:t.handleBoxScroll}},[t.showHotDestination?o("HotDestinations",{directives:[{name:"show",rawName:"v-show",value:0===t.active,expression:"active === 0"}],attrs:{cities:t.data.hotCities}}):t._e(),t._v(" "),t._l(t.data.destinations,(function(e,n){return o("AreaSelector",{directives:[{name:"show",rawName:"v-show",value:t.areaSelectorActive(n),expression:"areaSelectorActive(index)"}],key:n+1,attrs:{"lang-data":t.langData,countries:e.sub_menu_list}})})),t._v(" "),o("div",{directives:[{name:"show",rawName:"v-show",value:t.hasMore,expression:"hasMore"}],staticClass:"search-box-recommend_view-more"},[t._v("\n "+t._s(t.langData.scroll_to_viewmore)+"\n ")])],2)])},staticRenderFns:[]},undefined,v,undefined,false,undefined,!1,void 0,void 0,void 0)}}]); //# sourceMappingURL=0e0ea1.88d277df.chunk.js.map