"use strict";(function(i,t){EasyBooking.VariableDatepickers=function(){class i extends(EasyBooking.datepickersClass("variable")){constructor(i){super(i),this.$price_text=this.$cart.find(".wceb-price-format"),this.$picker_wrap.hide(),this.$price_text.hide()}events(){super.events(),this.$reset_dates.on({click:()=>{void 0!==this.product.variation&&this.updatePrice(this.product.variation.display_price,this.product.variation.display_regular_price)}}),this.$cart.on({update_variation_values:()=>{this.init(),this.$picker_wrap.find(".wceb_error").remove()},reset_data:()=>{delete this.product.variation,delete this.product.variation_id,this.init(),this.$picker_wrap.hide()},found_variation:(i,t)=>{this.product.variation=t,this.product.variation_id=t.variation_id,this.product.prices_html="",t.is_bookable||this.$add_to_cart_button.removeClass("date-selection-needed"),t.is_purchasable&&t.is_in_stock&&t.variation_is_visible&&t.is_bookable?(this.$picker_wrap.slideDown(200),this.product.booking_dates=EASYBOOKING.product_params[t.variation_id].booking_dates,this.product.first_date=parseInt(EASYBOOKING.product_params[t.variation_id].first_date),this.product.last_date=parseInt(EASYBOOKING.product_params[t.variation_id].last_date),this.product.min=parseInt(EASYBOOKING.product_params[t.variation_id].min),this.product.max=""===EASYBOOKING.product_params[t.variation_id].max?"":parseInt(EASYBOOKING.product_params[t.variation_id].max),this.product.booking_duration=parseInt(EASYBOOKING.product_params[t.variation_id].booking_duration),this.product.prices_html=EASYBOOKING.product_params[t.variation_id].prices_html,this.$cart.trigger("wceb_update_variation",t),"one"===this.product.booking_dates?this.$picker_wrap.find(".show_if_two_dates").hide():this.$picker_wrap.find(".show_if_two_dates").show(),this.updatePrice(t.display_price,t.display_regular_price),this.initPickers()):this.$picker_wrap.hide(),this.$cart.trigger("wceb_found_variation",t),t.is_bookable?this.$price_text.html(this.product.prices_html).show():this.$price_text.hide()}})}}return i}(),i(function(){i("body").find(".cart.variations_form:not( .bundled_item_cart_content )").each(function(){const t=new EasyBooking.VariableDatepickers(i(this))})})})(jQuery,window);