(e=>{"function"==typeof define&&define.amd?define("dashboard",e):e()})(function(){MyListing.Dashboard={},jQuery(function(c){var e,o;c(".woocommerce-MyAccount-navigation ul").length&&c(".woocommerce-MyAccount-navigation ul li.is-active, .woocommerce-MyAccount-navigation ul li.current-menu-item").length&&(e=c(".woocommerce-MyAccount-navigation ul li.is-active, .woocommerce-MyAccount-navigation ul li.current-menu-item").offset().left,(o=c(".woocommerce-MyAccount-navigation ul").offset().left)<e)&&c(".woocommerce-MyAccount-navigation ul").scrollLeft(e-o),c(".woocommerce-MyAccount-navigation > ul").each(function(){c(this).children(".menu-item").length<=6&&c(this).addClass("short")}),c(".c27-add-product-form input#_virtual").on("change",function(){c(".c27-add-product-form .product_shipping_class_wrapper")[c(this).is(":checked")?"hide":"show"]()}).trigger("change"),c(".c27-add-product-form input#_sale_price").on("input",function(){var e=c(this).closest(".c27-add-product-form"),o=!!c(this).val(),t="1"===e.attr("data-show-sale-dates"),a=e.find("._sale_price_dates_from__wrapper"),e=e.find("._sale_price_dates_to__wrapper");o||t?(a.removeClass("hide"),e.removeClass("hide")):(a.addClass("hide"),e.addClass("hide"))}).trigger("input"),c(document).on("click",".c27-add-product-form .toggle-sale-dates",function(e){e.preventDefault();var e=c(this).closest(".c27-add-product-form"),o=(e.attr("data-show-sale-dates","1"),e.find("._sale_price_dates_from__wrapper")),e=e.find("._sale_price_dates_to__wrapper");o.removeClass("hide"),e.removeClass("hide")}),c(".c27-add-product-form").each(function(){var e=c(this),o=e.find("#_sale_price_dates_from").val(),t=e.find("#_sale_price_dates_to").val();(o||t)&&(e.attr("data-show-sale-dates","1"),e.find("._sale_price_dates_from__wrapper, ._sale_price_dates_to__wrapper").removeClass("hide"))}),c(".c27-add-product-form input#_manage_stock").on("change",function(){var e=c(this).is(":checked");c(".c27-add-product-form ._stock__wrapper")[e?"show":"hide"](),c(".c27-add-product-form ._backorders__wrapper")[e?"show":"hide"]()}).trigger("change")}),1<jQuery(".woocommerce-MyAccount-navigation .current-menu-item").length&&jQuery(".woocommerce-MyAccount-navigation .current-menu-item.current_page_item").removeClass("current-menu-item")});
