PageSourceSearch

https://www.yotel.com/themes/custom/yotel/build/locationPageSearch.bundle.js?tm6jaf

js yotel.com collected 2026-10-02 03:03:54 UTC 11,366 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkyotel=self.webpackChunkyotel||[]).push([[1730],{2375:(e,t,o)=>{var r=o(7294),n=o(745),c=o(6113),i=o(5627),a=o(2432),s=o(7114),l=o(4735),u=o(7505),p=o(3736),d=o(8585),f=o(8843),y=o(3066);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,n=function(e,t){if("object"!==m(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,"string");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===m(n)?n:String(n)),r)}var n}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var g="overlay-displayed",w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(a,e);var t,o,n,c,i=(n=a,c=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,t=b(n);if(c){var o=b(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).indicator=r.createRef(),t.overlay=r.createRef(),t.searchContainer=r.createRef();var o=document.querySelector("[data-promo-code-corporate]");if(o){var n=o.dataset;e.setCode(n.promoCodeCorporate,"corpo"),e.setCode(n.promoCodeGroup,"group"),e.setCode(n.promoCodePromo,"promo")}var c=document.querySelector("[data-location-id]").dataset.locationId,s=window.drupalSettings.locations.find((function(e){return e.drupalId==c}));return e.setLocation(s),t.state={startingPrice:s.starting_price,startingPriceCurrency:s.starting_price_currency,scrollDistance:0},e.setStep("date-picker"),t}return t=a,(o=[{key:"componentDidMount",value:function(){(0,p.Z)(this.indicator.current,this.onTouchSwipe.bind(this),this.overlay.current),document.body.style.paddingBottom="".concat(this.searchContainer.current.getBoundingClientRect().height,"px")}},{key:"onTouchSwipe",value:function(e,t,o,r,n){"down"==t&&"move"==o&&this.props.isOverlayDisplayed?(this.overlay.current.style.transform="translateY(".concat(Math.round(n),"px)"),n>50&&(this.overlay.current.style.transform="",this.props.hideOverlay(),$(document.body).removeClass(g),$(document.body).css("top","auto"),document.documentElement.scrollTop=this.state.scrollDistance)):"end"==o&&n<50&&(this.overlay.current.style.transform="")}},{key:"onLabelClick",value:function(e){this.props.displayOverlay();var t=document.documentElement.scrollTop;this.setState({scrollDistance:t}),$(document.body).addClass(g),$(document.body).css("top","-".concat(t,"px"))}},{key:"render",value:function(){var e=function(e){if(!e)return null;switch(e){case"date-picker":return r.createElement(d.Z,null);case"time-picker":return r.createElement(f.Z,null);case"guests-rooms-selector":return r.createElement(y.Z,null);default:return null}}(this.props.step),t=this.state.startingPrice?"".concat((0,u.Z)("Rooms from")," ").concat(this.state.startingPrice," ").concat(this.state.startingPriceCurrency):"";return r.createElement("section",{className:"yot-location-search yot-location-page-search",ref:this.searchContainer},r.createElement("p",{className:"semi-bold small"},t),r.createElement("button",{type:"button",className:"yotel-btn semi-bold",onClick:this.onLabelClick.bind(this)},(0,u.Z)("Find a room")),r.createElement("div",{className:"yot-location-search__overlay ".concat(this.props.isOverlayDisplayed?"is-active":""),ref:this.overlay},r.createElement("div",{className:"yot-location-search__overlay__indicator",ref:this.indicator}),this.props.isOverlayDisplayed&&e),r.createElement("div",{className:"yot-location-search__overlay-under"}))}}])&&h(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Component);const C=(0,c.$j)((function(e,t){return{isOverlayDisplayed:e.ux.isOverlayDisplayed,step:e.history.step}}),(function(e){return{hideOverlay:function(){e((0,a.Jz)({isOverlayDisplayed:!1}))},displayOverlay:function(){e((0,a.Jz)({isOverlayDisplayed:!0}))},setLocation:function(t){e((0,s.l6)(t))},setCode:function(t,o){e((0,s.Gy)(t,o))},setStep:function(t){e((0,l.JB)([t],t))}}}))(w);var P=o(4444),O=o(5445),E=o(5559);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function S(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,n=function(e,t){if("object"!==k(e)||null===e)return e;var o=e[Symbol.toPrimitive];
1if(void 0!==o){var r=o.call(e,"string");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===k(n)?n:String(n)),r)}var n}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}var D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(a,e);var t,o,n,c,i=(n=a,c=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,t=j(n);if(c){var o=j(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e);var o=document.querySelector("[data-promo-code-corporate]");if(o){var n=o.dataset;e.setCode(n.promoCodeCorporate,"corpo"),e.setCode(n.promoCodeGroup,"group"),e.setCode(n.promoCodePromo,"promo")}var c=document.querySelector("[data-location-id]").dataset.locationId,s=window.drupalSettings.locations.find((function(e){return e.drupalId==c}));return e.setLocation(s),t.searchContainer=r.createRef(),t.bfeSearch=r.createRef(),t.state={scrolledPast:!1,startingPrice:s.starting_price,startingPriceCurrency:s.starting_price_currency},t}return t=a,(o=[{key:"componentDidMount",value:function(){var e=this;document.body.classList.add("yotel-cookie-button-padding"),window.onscroll=function(){window.scrollY>=400&&!e.state.scrolledPast&&e.setState({scrolledPast:!0}),window.scrollY<400&&e.state.scrolledPast&&e.setState({scrolledPast:!1})}.bind(this),window.addEventListener("click",this.onWindowClick.bind(this))}},{key:"componentDidUpdate",value:function(e,t){this.state.scrolledPast&&this.state.scrolledPast!=t.scrolledPast?document.body.style.paddingBottom="".concat(this.bfeSearch.current.offsetHeight,"px"):document.body.style.paddingBottom="0px"}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.onWindowClick.bind(this))}},{key:"onWindowClick",value:function(e){document.body.contains(e.target)&&!this.searchContainer.current.contains(e.target)&&this.props.hidePopup()}},{key:"onSearchClick",value:function(e){e.preventDefault(),(0,E.gA)(this.props)}},{key:"bfeOnClick",value:function(){$([document.documentElement,document.body]).animate({scrollTop:window.pageYOffset+this.searchContainer.current.getBoundingClientRect().top-150},800),this.props.updateDatePickerPopupDisplay()}},{key:"render",value:function(){var e=this.state.startingPrice?"".concat((0,u.Z)("Rooms from")," ").concat(this.state.startingPrice," ").concat(this.state.startingPriceCurrency):"";return r.createElement("div",{className:"container"},r.createElement("section",{className:"yot-location-search yot-location-page-search",ref:this.searchContainer},r.createElement("div",{className:"yot-location-search__container"},r.createElement(P.Z,null),r.createElement(O.Z,null),r.createElement("button",{className:"yotel-btn",onClick:this.onSearchClick.bind(this)},r.createElement("i",{className:"icon icon-search"}),(0,u.Z)("Search"))),r.createElement("div",{className:"yot-location-search__bfe ".concat(this.state.scrolledPast?"is-active":""),ref:this.bfeSearch},r.createElement("div",{className:"container"},r.createElement("p",{className:"semi-bold small"},e),r.createElement("button",{className:"yotel-btn",onClick:this.bfeOnClick.bind(this)},r.createElement("i",{className:"icon-search"}),(0,u.Z)("Find a room"))))))}}])&&S(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Component);const R=(0,c.$j)((function(e,t){return{location:e.search.location,startDate:e.search.startDate,endD
1ate:e.search.endDate,checkIn:e.search.checkIn,checkOut:e.search.checkOut,guests:e.search.guests,rooms:e.search.rooms,promoCode:e.search.promoCode,groupCode:e.search.groupCode,corpoCode:e.search.corpoCode,stayOvernight:e.search.stayOvernight}}),(function(e){return{setLocation:function(t){e((0,s.l6)(t))},setCode:function(t,o){e((0,s.Gy)(t,o))},updateDatePickerPopupDisplay:function(){e((0,a.v7)({displayDatepickerPopup:!0}))},hidePopup:function(){e((0,a.rt)())}}}))(D);var N=o(9932);window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var L={LocationPageSearch:function(){return r.createElement(c.zt,{store:i.Z},(0,N.tq)()&&r.createElement(C,null),(0,N.nI)()&&r.createElement(R,null))}};document.querySelectorAll("[data-react]").forEach((function(e){var t=e.getAttribute("data-react");if(t in L){var o=e.dataset;delete o.react;var c=L[t];n.s(e).render(r.createElement(c,o))}}))}},e=>{e.O(0,[8264,1216,3716],(()=>(2375,e(e.s=2375)))),e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.