![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /proc/self/cwd/wp-content/plugins/bdthemes-element-pack/assets/js/modules/ |
!function(t,e){"use strict";var o=function(t,e){var o=t.find(".bdt-coupon-code"),n=Boolean(elementorFrontend.isEditMode()),i=!1;if(o.length){var r=o.data("settings"),c=r.triggerURL;if(1!=r.triggerByAction)new ClipboardJS(r.couponMsgId,{target:function(t){return t.nextElementSibling}}).on("success",(function(t){e(t.trigger).addClass("active"),t.clearSelection(),setTimeout((function(){e(t.trigger).removeClass("active")}),3e3)}));if("style-2"==r.couponLayout&&1==r.triggerByAction)new ClipboardJS(r.couponId,{target:function(t){return t}}).on("success",(function(t){o.find(r.couponId).addClass("active"),t.clearSelection(),setTimeout((function(){o.find(r.couponId).removeClass("active")}),2e3)})),o.on("click",(function(){if(!o.hasClass("active")&&0!=r.triggerAttention){var t=r.triggerInputId;e('[name="'+t.substring(1)+'"]').closest("form").addClass("ep-shake-animation-cc"),setTimeout((function(){e('[name="'+t.substring(1)+'"]').closest("form").removeClass("ep-shake-animation-cc")}),5e3)}}));var a={decodeCoupon:function(t){jQuery.ajax({url:r.adminAjaxURL,type:"post",data:{action:"element_pack_coupon_code",coupon_code:t},success:function(t){e(r.couponId).find(".bdt-coupon-code-text").html(t)},error:function(){e(r.couponId).html("Something wrong, please contact support team.")}})},displayCoupon:function(t){t.addClass("active")},triggerURL:function(t){var o=!0!==r.is_external?"_self":"_blank",n=window.open(t,o);if(t){if("_self"==o&&-1!==t.indexOf("#")){var i=t.split("#")[1];i&&e("html, body").animate({scrollTop:e("#"+i).offset().top-100},1500)}n.location}return!1},formSubmitted:function(){this.displayCoupon(o),!1!==c&&this.triggerURL(c),this.decodeCoupon(r.couponCode),i=!0}};if(o.on("click",(function(){o.hasClass("active")||!0===r.triggerByAction||(a.displayCoupon(o),!1!==c&&setTimeout((function(){a.triggerURL(c)}),2e3))})),!n){var s=r.triggerInputId;e(document).ajaxComplete((function(t,e,o){i||(!1!==s&&!0===r.triggerByAction?o.data.toLowerCase().indexOf(s.substring(1))>=0&&a.formSubmitted():!0===r.triggerByAction&&a.formSubmitted())}))}}};jQuery(window).on("elementor/frontend/init",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/bdt-coupon-code.default",o)}))}(jQuery,window.elementorFrontend);