File: /var/www/html/wppartneramazingsecret/wp-content/themes/themify-ultra/themify/js/modules/wc.min.js
'use strict';(function(f,b,g){let n=!1,y=!1,v=!1,l=g.querySelector("form.variations_form select"),p=[];const F=themify_vars.wc_js["wc-add-to-cart-variation"],z=themify_vars.wc_js.wc_additional_variation_images_script,w=g.getElementsByClassName("woocommerce-ordering")[0],A=function(){this.closest("form").submit()},x=g.querySelectorAll("input.qty[min]"),G=function(a){if(!y&&themify_vars.photoswipe){y=!0;a.preventDefault();a.stopImmediatePropagation();a=themify_vars.wc_version;const c=this,e=function(q){delete themify_vars.photoswipe[q];
0===Object.keys(themify_vars.photoswipe).length&&(setTimeout(function(){c.click()},5),delete themify_vars.photoswipe)};b.LoadCss(themify_vars.photoswipe.main,a,null,null,function(){e("main")});b.LoadCss(themify_vars.photoswipe.skin,a,null,null,function(){e("skin")})}},u=function(a,c,e,q){const d=themify_vars.wc_js,h=themify_vars.wc_version,B=a&&!0!==a,k=function(r){delete d[r];0===Object.keys(d).length&&(b.body.off("click.tf_wc_click").off("added_to_cart removed_from_cart",C),w&&w.removeEventListener("change",
A,{passive:!0,once:!0}),setTimeout(function(){if(a&&!0!==a&&"load"!==a)if("click"===a.type)for(let m=0,t=p.length;m<t;++m)b.body[0].contains(p[m])&&p[m].click();else b.body.triggerHandler(a.type,[c,e,q]);p=null;b.trigger("tf_wc_js_load")},5))},D=function(){d.woocommerce?b.LoadAsync(d.woocommerce,function(){k("woocommerce")},-1===d.woocommerce.indexOf("ver=",12)?h:!1,null,function(){return void 0!==f.scroll_to_notices}):k("woocommerce")},E=function(){const r=g.getElementsByClassName("variations_form");
if(r[0]||0<g.getElementsByClassName("wcpa_form_outer").length)z&&(f.wc_additional_variation_images_frontend||b.LoadAsync(z,-1===z.indexOf("ver=",12)?h:!1,!1,null,function(){return void 0!==f.wc_additional_variation_images_frontend})),b.LoadAsync(themify_vars.includesURL+"js/underscore.min.js",function(){b.LoadAsync(themify_vars.includesURL+"js/wp-util.min.js",function(){const m=function(){for(let t=r.length-1;-1<t;--t)f(r[t]).wc_variation_form();l&&v&&b.triggerEvent(l,"change");l=v=null};f.fn.wc_variation_form?
m():b.LoadAsync(F,m,h,null,function(){return"undefined"!==typeof f.fn.wc_variation_form})},themify_vars.wp,null,function(){return void 0!==window.wp&&void 0!==window.wp.template})},themify_vars.wp,null,function(){return"undefined"!==typeof window._})};!0===B&&(d["jquery-blockui"]&&(void 0===f.blockUI?b.LoadAsync(d["jquery-blockui"],function(){k("jquery-blockui")},-1===d["jquery-blockui"].indexOf("ver=",12)?h:!1,null,function(){return void 0!==f.blockUI}):k("jquery-blockui")),d["wc-add-to-cart"]?b.LoadAsync(d["wc-add-to-cart"],
function(){k("wc-add-to-cart");E()},-1===d["wc-add-to-cart"].indexOf("ver=",12)?h:!1,null,function(){return void 0!==themify_vars.wc_js_normal}):E(),f.fn.wc_product_gallery||"undefined"===typeof wc_single_product_params?delete d["wc-single-product"]:d["wc-single-product"]&&b.LoadAsync(d["wc-single-product"],function(){k("wc-single-product");b.trigger("tf_init_photoswipe")},-1===d["wc-single-product"].indexOf("ver=",12)?h:!1,null,function(){return void 0!==f.fn.wc_product_gallery}));d["js-cookie"]?
b.LoadAsync(d["js-cookie"],function(){k("js-cookie");b.LoadAsync(d["wc-cart-fragments"],function(){k("wc-cart-fragments")},-1===d["wc-cart-fragments"].indexOf("ver=",12)?h:!1,null,function(){return void 0!==themify_vars.wc_js_normal});!0===B&&D()},-1===d["js-cookie"].indexOf("ver=",12)?h:!1,null,function(){return!!window.Cookies}):D()},C=function(a,c,e,q){!1===n&&(n=!0,u(a,c,e,q))};b.body.one("added_to_cart removed_from_cart",C).on("click.tf_wc_click",".ajax_add_to_cart,.remove_from_cart_button",
function(a){a.preventDefault();a.stopImmediatePropagation();a.target.classList.contains("loading")||(p.push(a.target),a.target.classList.add("loading"));!1===n&&(n=!0,u(a))});if(null!==l){const a=function(c){if(l&&!v){const e=b.isTouch?"touchstart":"mousemove";window.removeEventListener("scroll",a,{once:!0,passive:!0});window.removeEventListener(e,a,{once:!0,passive:!0});l.removeEventListener("change",a,{once:!0,passive:!0});c&&"change"===c.type&&c.stopImmediatePropagation();!1===n&&(n=v=!0,u("load"))}};
window.addEventListener("scroll",a,{once:!0,passive:!0});window.addEventListener(b.isTouch?"touchstart":"mousemove",a,{once:!0,passive:!0});l.addEventListener("change",a,{once:!0,passive:!0});b.requestIdleCallback(a,1500)}w&&w.addEventListener("change",A,{passive:!0,once:!0});for(let a=x.length-1;-1<a;a--){let c=parseFloat(x[a].min);0<=c&&parseFloat(x[a].value)<c&&(x[a].value=c)}delete themify_vars.wc_js["wc-add-to-cart-variation"];delete themify_vars.wc_js.wc_additional_variation_images_script;b.on("tf_wc_init",
function(a){!0===a||g.getElementsByClassName("woocommerce-input-wrapper")[0]||g.getElementsByClassName("woocommerce-store-notice")[0]?u("load"):u(!0);b.trigger("tf_init_photoswipe")}).on("tf_init_photoswipe",function(a){if(f.fn.wc_product_gallery&&"undefined"!==typeof wc_single_product_params)if(wc_single_product_params.photoswipe_enabled){a||(a=g);a=a.getElementsByClassName("woocommerce-product-gallery");for(let e=a.length-1;-1<e;--e){var c=f(a[e]);c.data("product_gallery")||(c.wc_product_gallery(wc_single_product_params),
(c=c.data("flexslider"))&&setTimeout(c.resize.bind(c),100));y||(c=a[e].getElementsByClassName("woocommerce-product-gallery__trigger")[0])&&c.addEventListener("click",G,{once:!0})}}else b.off("tf_init_photoswipe")}).trigger("tf_init_photoswipe")})(jQuery,Themify,document);