!function o(l,u,a){function s(t,e){if(!u[t]){if(!l[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(c)return c(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=u[t]={exports:{}};l[t][0].call(i.exports,function(e){return s(l[t][1][e]||e)},i,i.exports,o,l,u,a)}return u[t].exports}for(var c="function"==typeof require&&require,e=0;e<a.length;e++)s(a[e]);return s}({1:[function(e,t,r){"use strict";var n,i=e("@babel/runtime/helpers/interopRequireDefault")(e("./pages/smart-alert"));(n=window.sellkit_pro_frontend.pages).length.isArray&&0===n.length.length||n.includes("smart-alert")&&(0,i.default)()},{"./pages/smart-alert":2,"@babel/runtime/helpers/interopRequireDefault":3}],2:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;function n(){jQuery(document).on("click",".sellkit-smart-alert-button",function(){var e=jQuery(this).parents("div[data-source=sellkit_smart_alert_notice], li[data-source=sellkit_smart_alert_notice]").data("rule_id");wp.ajax.post("sellkit_smart_alert_send_click_log",{nonce:window.sellkit_pro_frontend.nonce,rule_id:e})})}r.default=n},{}],3:[function(e,t,r){t.exports=function(e){return e&&e.__esModule?e:{default:e}}},{}]},{},[1]);
jQuery(function($){
$('body').on('click','.jupiterx-product-has-quick-view',function (){
setTimeout(addInputAndEvents);
function addInputAndEvents(){
id=$('.featherlight-content .jupiterx-product-quick-view-modal').attr('id');
if($('.featherlight-content #' + id + ' .custom-qty-input').length==0){
$('.featherlight-content #' + id + ' .input-text.qty').hide();
$('.featherlight-content #' + id + ' .input-text.qty').after('<div class=\"input-group input-text qty text custom-qty-input \"><div class=\"input-group-prepend\"><button style=\"min-width: 0; box-shadow: none;\" class=\"btn btn-decrement btn-sm btn-outline-secondary\" type=\"button\" tabindex=\"-1\"><strong>-</strong></button></div><input type=\"text\" value="" style=\"text-align: center\" class=\"form-control input-text qty text\" placeholder=\"\" tabindex=\"-1\"><div class=\"input-group-append\"><button style=\"min-width: 0; box-shadow: none;\" class=\"btn btn-increment btn-sm btn-outline-secondary\" type=\"button\" tabindex=\"-1\"><strong>+</strong></button></div></div>');
$('.featherlight-content #' + id + ' .custom-qty-input .input-text.qty').val($('.featherlight-content #' + id +' .input-text.qty').val()) ;
}
$('.featherlight-content .jupiterx-product-quick-view-modal').on('keyup paste change', '.custom-qty-input .qty', function(){
$('.featherlight-content #' + id + ' .input-text.qty').val($(this).val());
});
$('.featherlight-content #' + id).on('click', '.btn-increment', function(){
$('.featherlight-content #' + id + ' .custom-qty-input .input-text.qty').val(function(i, oldval){
return parseInt(oldval, 10) + 1;
}).trigger('change');
});
$('.featherlight-content #' + id).on('click', '.btn-decrement', function(){
$('.featherlight-content #' + id + ' .custom-qty-input .input-text.qty').val(function(i, oldval){
if(parseInt(oldval, 10) > 1){
return parseInt(oldval, 10) - 1;
}else{
return parseInt(oldval, 10);
}}).trigger('change');
});
}});
});