(()=>{var e=e||{};function r(){if($(".form-booking .date-picker").length>0){var e=new Date,r=new Date(e.getFullYear(),e.getMonth(),e.getDate());$(".form-booking .date-picker").each((function(){var e={autoclose:!0,startDate:r};$(this).data("locale")&&(e.language=$(this).data("locale")),$(this).data("date-format")&&(e.format=$(this).data("date-format")),$(this).datepicker(e)}))}}window.RiorelaxTheme=e,toastr.options={positionClass:"toast-bottom-right"},e.showError=function(e){toastr.error(e)},e.showSuccess=function(e){toastr.success(e)},e.isRtl=function(){return"rtl"===document.body.dir},e.handleError=function(r){void 0!==r.errors&&r.errors.length?e.handleValidationError(r.errors):void 0!==r.responseJSON?void 0!==r.responseJSON.errors?422===r.status&&e.handleValidationError(r.responseJSON.errors):void 0!==r.responseJSON.message?e.showError(r.responseJSON.message):$.each(r.responseJSON,(function(r,t){$.each(t,(function(r,t){e.showError(t)}))})):e.showError(r.statusText)},e.handleValidationError=function(r){var t="";$.each(r,(function(e,r){""!==t&&(t+="<br />"),t+=r})),e.showError(t)},function(t){"use strict";t(document).on("submit",".newsletter-form",(function(r){r.preventDefault(),r.stopPropagation();var o=t(r.target),a=o.find('button[type="submit"]');t.ajax({type:"POST",cache:!1,url:o.closest("form").prop("action"),data:new FormData(o.closest("form")[0]),contentType:!1,processData:!1,beforeSend:function(){a.addClass("button-loading"),a.attr("disable")},success:function(r){r.error?e.handleError(r.message):(o.closest("form").find("input[type=email]").val(""),e.showSuccess(r.message))},error:function(r){e.handleError(r)},complete:function(){"undefined"!=typeof refreshRecaptcha&&refreshRecaptcha(),a.removeClass("button-loading"),a.removeAttr("disable")}})})),r()}(jQuery)})();