(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{66:function(t,e,n){"use strict";n.r(e);var i=n(0),o={initHotelsSearch:function(){var t="undefined"!=typeof $context?$($context).find("#roomStartDate"):$("#roomStartDate"),e="undefined"!=typeof $context?$($context).find("#roomEndDate"):$("#roomEndDate"),n="undefined"!=typeof $context?$($context).find("#hotels-search-form").find(".m-tabs").find(".m-tab, .m-icon-tab"):$("#hotels-search-form").find(".m-tabs").find(".m-tab, .m-icon-tab"),i="undefined"!=typeof $context?$($context).find("#hotelSearchForm"):$("#hotelSearchForm"),o="undefined"!=typeof $context?$($context).find("#hotels-search-form-title"):$("#hotels-search-form-title");"undefined"!=typeof $context?$($context).find("#hotels-search-button"):$("#hotels-search-button"),"undefined"!=typeof $context?$($context).find("#hotels-search-button-label"):$("#hotels-search-button-label");("undefined"!=typeof $context?$($context).find("#sinFechas"):$("#sinFechas")).on("click",(function(){$(this).is(":checked")?(t.removeAttr("required"),e.removeAttr("required")):(t.attr("required",!0),e.attr("required",!0)),i.parsley().validate()})),n.each((function(){var t=$(this).attr("data-form-action"),e=$(this).attr("data-form-title");$(this).on("click",(function(){i.attr("action",t),o.html(e)}))})),n.filter(".is-active").trigger("click")},initZendeskFix:function(){if(1===$(".o-footer").length)new Waypoint.Inview({element:$(".o-footer"),enter:function(t){i.a.$("body").addClass("--footer-visible"),$("#zendeskAuxFull").length>0&&i.a.$("body").addClass("--footer-visible-full"),document.body.classList.contains("is-didomi-visible")&&(i.a.fixedElementsFromElement(document.querySelector("footer.o-footer")),$(window).off("resize.initZendeskFixDidomi"),$(window).on("resize.initZendeskFixDidomi",(function(t){i.a.fixedElementsFromElement(document.querySelector("footer.o-footer"))})))},exited:function(t){i.a.$("body").removeClass("--footer-visible"),i.a.$("body").removeClass("--footer-visible-full"),document.body.classList.contains("is-didomi-visible")&&(i.a.removeFixedElementsFromElement(),$(window).off("resize.initZendeskFixDidomi"))}})},printMapOnLoad:function(){$(".print-on-load").length>0&&$(window).on("load",(function(){0==$(".js-map-new").length&&void 0!==window.print&&null!==window.print&&"function"==typeof window.print&&window.print()}))},printApp:function(t){(void 0!==t?$(t).find(".print-click"):$(".print-click")).on("click",(function(t){t.preventDefault(),i.a.hasMobileApp("print")||i.a.hasWebKit("print")?i.a.sendMessageToApp("print"):void 0!==window.print&&null!==window.print&&"function"==typeof window.print&&window.print()}))},initTabs:function(){$(".m-tabs").each((function(){var t=$(this).find(".m-tab, .m-icon-tab");t.on("click",(function(){var e=$(this);t.removeClass("is-active"),e.addClass("is-active")}))}))},tableHeaders:function(t){t=void 0!==t?t:i.a.$("body");var e=$(t).find("table"),n=$(e).find("tr:first");$(n).each((function(t,e){var n=$(e).children(),i=$(e).children("th");$(n).length===$(i).length&&$(e).addClass("--mainHeaderTable")}))},initPrintV2:function(){$(".activityPrintButton").is("._is-set")||$(".activityPrintButton").on("click.print",(function(){window.print()}));var t=i.a.isActivityDetail(),e="function"==typeof window.onbeforeprint?window.onbeforeprint:Function.prototype;window.onbeforeprint=function(n){!function(){if(!t){var e=$(".b-lazy, .blazy").not(".b-loaded");CivAPP.BlazyController.loadElement(e,!0)}}(),e()}},onlyTextOpinion:function(){$("#onlyTextOpinion").on("change",(function(){var t=$(this);if(t.is(":checked")){var e=window.location.href;e=i.a.addParam("withText",1,e),window.location.href=e}if(!t.is(":checked")){var n=window.location.href;n=i.a.removeParam("withText",n),window.location.href=n}}))},deleteItems:function(){var t=window.deleteItems;null!=t&&$.each(Object.keys(t),(function(t,e){var n=window.deleteItems[e];$("[data-"+e+"Item]").each((function(t,i){var o=$(i).closest(".l-main-section"),a=$(i).attr("data-"+e+"Item");(a="string"==typeof a?parseInt(a):a,-1!==n.indexOf(a))&&(i.remove(),o.length>0&&0==$(o).find("[data-"+e+"Item]").length&&$(o).remove())}))}))},isInDeleteItems:function(t,e){var n=window.deleteItems;return null!=n&&(t="string"==typeof t?parseInt(t.replace(/[A-Za-z]/g,"")):t,void 0!==n[e]&&null!==n[e]&&n[e].length>0&&-1!==jQuery.inArray(t,n[e]))}};e.default=o}}]);