{Ninja-Shell}
Home
Info
Upload
Command
View /etc/passwd
cPanel Reset Password
Filename: /var/www///arsu_theme/public/themes/shofy/js/ecommerce.js
(()=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var r,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",d=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(r){l=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),c=new P(n||[]);return i(a,"_invoke",{value:_(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var m="suspendedStart",h="suspendedYield",v="executing",b="completed",g={};function y(){}function w(){}function T(){}var $={};l($,u,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(D([])));E&&E!==o&&a.call(E,u)&&($=E);var L=T.prototype=y.prototype=Object.create($);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function C(e,r){function n(o,i,c,u){var d=f(e[o],e,i);if("throw"!==d.type){var s=d.arg,l=s.value;return l&&"object"==t(l)&&a.call(l,"__await")?r.resolve(l.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(l).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(d.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(a,a):a()}})}function _(t,e,n){var o=m;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===b){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var d=f(t,e,n);if("normal"===d.type){if(o=n.done?b:h,d.arg===g)continue;return{value:d.arg,done:n.done}}"throw"===d.type&&(o=b,n.method="throw",n.arg=d.arg)}}}function S(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,S(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=f(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function D(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=T,i(L,"constructor",{value:T,configurable:!0}),i(T,"constructor",{value:w,configurable:!0}),w.displayName=l(T,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,T):(t.__proto__=T,l(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},n.awrap=function(t){return{__await:t}},k(C.prototype),l(C.prototype,d,(function(){return this})),n.AsyncIterator=C,n.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new C(p(t,e,r,o),a);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(L),l(L,s,"Generator"),l(L,u,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=D,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),d=a.call(i,"finallyLoc");if(u&&d){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!d)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:D(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}$((function(){"use strict";var t=function(t){$(".cartmini__area").html(t.cart_mini),$('[data-bb-value="cart-count"]').text(t.count),$(".tp-cart-area").length&&$(".tp-cart-area").replaceWith(t.cart_content),void 0!==Theme.lazyLoadInstance&&Theme.lazyLoadInstance.update()},n=function(e){var r;r=e?$(e).closest("form"):$("form.cart-form"),$.ajax({type:"POST",url:r.prop("action"),data:r.serialize(),success:function(e){var r=e.error,n=e.message,o=e.data;r&&Theme.showError(n),t(o)},error:function(t){return Theme.handleError(t)}})};window.onBeforeChangeSwatches=function(t,e){var r=e.closest("form");t&&(r.find('button[type="submit"]').prop("disabled",!0),r.find('button[data-bb-toggle="add-to-cart"]').prop("disabled",!0))},$(document).on("click",'[data-bb-toggle="remove-coupon"]',(function(t){t.preventDefault();var e=$(t.currentTarget);$.ajax({url:e.prop("href"),type:"POST",success:function(t){var e=t.error,r=t.message;e?Theme.showError(r):(Theme.showSuccess(r),n())},error:function(t){return Theme.handleError(t)}})})).on("click",'[data-bb-toggle="decrease-qty"]',(function(t){var e=$(t.currentTarget).parent().find("input"),r=parseInt(e.val())-1;r=r<1?1:r,e.val(r),e.trigger("change")})).on("click",'[data-bb-toggle="increase-qty"]',(function(t){var e=$(t.currentTarget).parent().find("input"),r=e.prop("max");r&&parseInt(e.val())>=parseInt(r)||(e.val(parseInt(e.val())+1),e.trigger("change"))})).on("change",'[data-bb-toggle="update-cart"]',(function(t){n(t.currentTarget)})).on("click",'[data-bb-toggle="change-product-filter-layout"]',(function(t){t.preventDefault();var e=$(t.currentTarget);e.addClass("active"),e.closest("li").siblings().find("button").removeClass("active"),$(".bb-product-form-filter").find('[name="layout"]').val(e.data("value")).trigger("change")})).on("click",'[data-bb-toggle="copy-coupon"]',function(){var t,n=(t=e().mark((function t(r){var n,o,a,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.preventDefault(),n=$(r.currentTarget),o=n.data("value"),a=n.find("span").text(),!navigator.clipboard){t.next=9;break}return t.next=7,navigator.clipboard.writeText(o);case 7:t.next=15;break;case 9:(i=document.createElement("input")).value=o,document.body.appendChild(i),i.select(),document.execCommand("copy"),document.body.removeChild(i);case 15:n.find("span").text(n.data("copied-message")),setTimeout((function(){return n.find("span").text(a)}),2e3);case 17:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function c(t){r(i,o,a,c,u,"next",t)}function u(t){r(i,o,a,c,u,"throw",t)}c(void 0)}))});return function(t){return n.apply(this,arguments)}}()).on("click",'[data-bb-toggle="scroll-to-review"]',(function(t){if($(".nav-tabs button#nav-review-tab").length){t.preventDefault();var e=$(".nav-tabs button#nav-review-tab"),r=$(".product-review-container");e.length&&r.length&&(e.tab("show"),$("html, body").animate({scrollTop:r.offset().top-100}))}})).on("show.bs.modal","#product-quick-view-modal",(function(t){var e=$(t.currentTarget),r=$(t.relatedTarget);$.ajax({url:r.data("url")||r.prop("href"),type:"GET",beforeSend:function(){r.addClass("btn-loading"),e.find(".modal-content").css("min-height","40rem").html('<div class="loading-spinner"></div>')},success:function(t){var r=t.error,n=t.data;r||(e.find(".modal-content").css("min-height","0").html(n),void 0!==Theme.lazyLoadInstance&&Theme.lazyLoadInstance.update(),setTimeout((function(){EcommerceApp.initProductGallery(!0)}),100),document.dispatchEvent(new CustomEvent("ecommerce.quick-view.initialized")))},complete:function(){return r.removeClass("btn-loading")}})})).on("submit","form#counpon-form",(function(t){t.preventDefault();var e=$(t.currentTarget),r=e.find('button[type="submit"]');$.ajax({url:e.prop("action"),type:"POST",data:e.serialize(),beforeSend:function(){return r.prop("disabled",!0).addClass("btn-loading")},success:function(t){var e=t.error,r=t.message;e?Theme.showError(r):(Theme.showSuccess(r),n())},error:function(t){return Theme.handleError(t)},complete:function(){return r.prop("disabled",!1).removeClass("btn-loading")}})})).on("keyup","form#counpon-form input",(function(t){var e=$(t.currentTarget);e.closest("form").find('button[type="submit"]').prop("disabled",!e.val())})).on("click",'.product-form button[type="submit"]',(function(e){e.preventDefault();var r=$(e.currentTarget),n=r.closest("form"),o=n.serializeArray();""!==n.find('input[name="id"]').val()&&(o.push({name:"checkout",value:"checkout"===r.prop("name")?1:0}),$.ajax({type:"POST",url:n.prop("action"),data:o,beforeSend:function(){r.prop("disabled",!0).addClass("btn-loading")},success:function(e){var r=e.error,o=e.message,a=e.data;if(r)return Theme.showError(o),void(void 0!==(null==a?void 0:a.next_url)&&(window.location.href=a.next_url));n.find('input[name="qty"]').val(1),void 0!==(null==a?void 0:a.next_url)?window.location.href=a.next_url:(t(a),$(".cartmini__area").addClass("cartmini-opened"),$(".body-overlay").addClass("opened"))},error:function(t){return Theme.handleError(t)},complete:function(){return r.prop("disabled",!1).removeClass("btn-loading")}}))})).on("click",'[data-bb-toggle="scroll-to-review"]',(function(t){if($(".nav-tabs button#nav-review-tab").length){t.preventDefault();var e=$(".nav-tabs button#nav-review-tab"),r=$(".product-review-container");e.length&&r.length&&(e.tab("show"),$("html, body").animate({scrollTop:r.offset().top-100}))}})).on("click",".js-sale-popup-quick-view-button",(function(t){t.preventDefault(),$("#product-quick-view-modal").modal("show",t.currentTarget)})).on("change",".tp-shop-top-select select",(function(t){var e=$(t.currentTarget);$(".bb-product-form-filter").find('input[name="'.concat(e.prop("name"),'"]')).val(e.val()).trigger("submit")})).on("click",".bb-product-items-wrapper .pagination a",(function(t){t.preventDefault();var e=$(t.currentTarget),r=new URL(e.prop("href")).searchParams.get("page");$(".bb-product-form-filter").find('[name="page"]').val(r).trigger("change")})).on("submit","form.subscribe-form",(function(t){t.preventDefault();var e=$(t.currentTarget),r=e.find("button[type=submit]");$.ajax({type:"POST",cache:!1,url:e.prop("action"),data:new FormData(e[0]),contentType:!1,processData:!1,beforeSend:function(){return r.prop("disabled",!0).addClass("btn-loading")},success:function(t){var r=t.error,n=t.message;r?Theme.showError(n):(e.find("input").val(""),Theme.showSuccess(n),document.dispatchEvent(new CustomEvent("newsletter.subscribed")))},error:function(t){"undefined"!=typeof refreshRecaptcha&&refreshRecaptcha(),Theme.handleError(t)},complete:function(){"undefined"!=typeof refreshRecaptcha&&refreshRecaptcha(),r.prop("disabled",!1).removeClass("btn-loading")}})})).on("click",'[data-bb-toggle="product-tab"]',(function(t){t.preventDefault();var e=$(t.currentTarget),r=e.closest(".tp-product-area").find("#productTabContent .tab-pane"),n=r.closest(".tp-product-area"),o=e.find("span.tp-product-tab-tooltip");$.ajax({url:"".concat(e.closest("#productTab").data("ajax-url"),"&type=").concat(e.data("bb-value")),method:"GET",dataType:"json",beforeSend:function(){o.text("..."),n.append('<div class="loading-spinner"></div>')},success:function(t){var e=t.data;o.text(e.count),r.html(e.html),void 0!==Theme.lazyLoadInstance&&Theme.lazyLoadInstance.update()},error:function(t){return Theme.handleError(t)},complete:function(){return $(".loading-spinner").remove()}})})).on("submit",".contact-form",(function(t){t.preventDefault();var e=$(t.currentTarget),r=e.find("button[type=submit]");$.ajax({type:"POST",cache:!1,url:e.prop("action"),data:new FormData(e[0]),contentType:!1,processData:!1,beforeSend:function(){return r.addClass("button-loading")},success:function(t){var r=t.error,n=t.message;r?Theme.showError(n):(e[0].reset(),Theme.showSuccess(n))},error:function(t){return Theme.handleError(t)},complete:function(){"undefined"!=typeof refreshRecaptcha&&refreshRecaptcha(),r.removeClass("button-loading")}})})).on("click",".sticky-actions-button button",(function(t){t.preventDefault();var e=$(t.currentTarget),r=$("form.product-form");"add-to-cart"===e.prop("name")&&r.find('button[type="submit"][name="add-to-cart"]').trigger("click"),"checkout"===e.prop("name")&&r.find('button[type="submit"][name="checkout"]').trigger("click")})).on("click",'[data-bb-toggle="open-mini-cart"]',(function(t){$('[data-bb-toggle="mini-cart-content-slot"]').html('<div class="loading-spinner"></div>'),$.ajax({url:$(t.currentTarget).data("url"),type:"GET",success:function(t){var e=t.data;$('[data-bb-toggle="mini-cart-content-slot"]').html(e.content),$('[data-bb-toggle="mini-cart-footer-slot"]').html(e.footer),void 0!==Theme.lazyLoadInstance&&Theme.lazyLoadInstance.update()},error:function(t){return Theme.handleError(t)}})})),document.addEventListener("ecommerce.quick-view.initialized",(function(){$("[data-countdown]").countdown()})),document.addEventListener("ecommerce.cart.added",(function(e){var r=e.detail.data;t(r),$(".cartmini__area").addClass("cartmini-opened"),$(".body-overlay").addClass("opened")})),document.addEventListener("ecommerce.cart.removed",(function(e){var r=e.detail.data;0===r.count&&($(".cartmini__area").removeClass("cartmini-opened"),$(".body-overlay").removeClass("opened")),t(r)})),document.addEventListener("ecommerce.wishlist.removed",(function(e){var r=e.detail,n=r.data;r.element.closest("tr").remove(),0===n.count&&window.location.reload(),t(n)})),document.addEventListener("ecommerce.compare.added",(function(t){var e=t.detail.element;e.find("span")&&e.find("span").text(e.hasClass("active")?e.data("remove-text"):e.data("add-text"))})),document.addEventListener("ecommerce.wishlist.added",(function(t){var e=t.detail,r=e.data,n=e.element;r.added?n.addClass("active"):n.removeClass("active"),n.find("span")&&n.find("span").text(r.added?n.data("remove-text"):n.data("add-text"))})),document.addEventListener("ecommerce.compare.removed",(function(t){var e=t.detail.element;e.find("span")&&e.find("span").text(e.hasClass("active")?e.data("remove-text"):e.data("add-text"))})),document.addEventListener("ecommerce.product-filter.before",(function(){$(".tp-shop-area > .container, .bb-shop-detail > .container > .bb-shop-tab-content").append('<div class="loading-spinner"></div>')})),document.addEventListener("ecommerce.product-filter.success",(function(t){var e=t.detail.data;$(".bb-product-items-wrapper").html(e.data),e.additional&&$(".bb-shop-sidebar").replaceWith(e.additional.filters_html),$(".tp-shop-top-result p").text(e.message),$(".bb-product-price-filter").length&&EcommerceApp.initPriceFilter(),$("html, body").animate({scrollTop:$(".tp-shop-main-wrapper").offset().top-120})})),document.addEventListener("ecommerce.product-filter.completed",(function(){$(".tp-shop-area > .container, .bb-shop-detail > .container > .bb-shop-tab-content").find(".loading-spinner").remove(),void 0!==Theme.lazyLoadInstance&&Theme.lazyLoadInstance.update()})),document.addEventListener("ecommerce.quick-shop.before-send",(function(t){var e=t.detail,r=e.element,n=e.modal;r.addClass("btn-loading"),n.find(".modal-body").css("min-height","16rem").html('<div class="loading-spinner"></div>')})),document.addEventListener("ecommerce.quick-shop.completed",(function(t){var e=t.detail,r=e.element,n=e.modal;r.removeClass("btn-loading"),n.find(".modal-body").css("min-height","0")})),"#product-review"===window.location.hash&&$(document).find('[data-bb-toggle="scroll-to-review"]').trigger("click");var o=function(){$(document).find('[data-bb-toggle="product-tab"]').first().trigger("click")};o(),document.addEventListener("shortcode.loaded",(function(t){var e=t.detail,r=e.name,n=e.attributes;"ecommerce-product-groups"===r&&"columns"!==n.style&&o(),$("[data-countdown]").countdown()}))}))})();
./Ninja\.