// source --> https://www.mai-tech.at/wp-content/plugins/b2b-market/assets/public/bm-update-price.min.js?ver=2.1.6 
jQuery(function($){var qty_element=".qty";var last_bulk_prices=false;var initial_quantity=false;var initial_shortcode_price_html="";var initial_shortcode_rrp_html="";var current_variation_id=null;var current_request=null;if($(".wooco_component_product_qty_input").length||$(".woosb-bundled").length){var qty_element="form.cart .qty"}if($(".custom-qty").length>0){qty_element=".custom-qty"}if($(".custom-qty").length>0){qty_element=".custom-qty"}if($(".tc").length>0){qty_element=".tc"}$(document.body).on("found_variation","form.variations_form",function(event,variation){current_variation_id=variation.variation_id});$(".single_variation_wrap").on("hide_variation",function(){current_variation_id=null});$(document.body).on("reset_data","form.variations_form",function(){current_variation_id=null});if($(".single_variation_wrap").length){if($(".b2b-shortcode-product-group-price").length){var product_id=$("#current_id").data("id");initial_shortcode_price_html=$('.b2b-shortcode-product-group-price[data-product_id="'+product_id+'"] > .price').html()}if($(".summary > .b2b-rrp").length){initial_shortcode_rrp_html=$(".summary > .b2b-rrp").prop("outerHTML")}$(".single_variation_wrap").on("show_variation",function(event,variation){if("undefined"!==typeof wc_gzd_add_to_cart_variation_params&&$(".woocommerce-variation-price").length){$(".variations_form .woocommerce-variation-price").hide()}$(qty_element).change()});$(".single_variation_wrap").on("hide_variation",function(event,variation){if(""!=initial_shortcode_price_html){var product_id=$("#current_id").data("id");$('.b2b-shortcode-product-group-price[data-product_id="'+product_id+'"] > .price').html(initial_shortcode_price_html)}if($(".summary > .b2b-rrp").length){if(""!==initial_shortcode_rrp_html){$(".summary > .b2b-rrp").replaceWith(initial_shortcode_rrp_html)}else{$(".summary > .b2b-rrp").remove()}}});if($(".bm-price-totals").length){var mut=new MutationObserver(function(mutations){mutations.forEach(function(mutationRecord){if(mutationRecord.target.classList.contains("disabled")){$(".bm-price-totals").hide()}else{$(".bm-price-totals").show()}})});var target=$(".single_variation_wrap button[type=submit]")[0];mut.observe(target,{attributes:true})}}if($(".wcpa_form_outer").length){$(".wcpa_form_outer input.wcpa_has_price").on("change",function(event){$(qty_element).change()})}$.fn.updatePrice=function(price_data,exclude=""){if($(this).find(".price > ins").length){if(exclude!=""){$(this).find(".price:not("+exclude+") ins > .amount").replaceWith(price_data["price"])}else{$(this).find(".price > ins > .amount").replaceWith(price_data["price"])}}else{if(exclude!=""){if($(".woocommerce-variation").length){if($(this).find(".woocommerce-variation .price:not("+exclude+")").length){$(this).find(".woocommerce-variation .price:not("+exclude+") > .amount").replaceWith(price_data["price"])}else{$(this).find(".price:not("+exclude+")").empty().html(price_data["price"])}}else{$(this).find(".price:not("+exclude+") > .amount").replaceWith(price_data["price"])}}else{$(this).find(".price > .amount").replaceWith(price_data["price"])}}if($(this).find(".price-per-unit .amount").length&&""!=price_data["ppu"]){if(!$(this).find(".price").hasClass("wc-gzd-additional-info")){if($(".woocommerce-variation-price").length){$(this).find(".woocommerce-variation-price .price-per-unit .amount").replaceWith(price_data["ppu"])}else{$(this).find(".price-per-unit .amount").replaceWith(price_data["ppu"])}}}else{if(!$(this).find(".price").hasClass("wc-gzd-additional-info")){if($(".woocommerce-variation-price").length){$(this).find(".woocommerce-variation-price .price-per-unit .amount").empty()}else{$(this).find(".price-per-unit .amount").empty()}}}};let bulk_price_table_selector="."+bm_update_price.bulk_price_table_class;let bulk_price_table_pick_min_max_qty=bm_update_price.bulk_price_table_pick_min_max_qty;if("min"!=bulk_price_table_pick_min_max_qty&&"max"!=bulk_price_table_pick_min_max_qty){bulk_price_table_pick_min_max_qty="min"}let bulk_table_rows=null;let background_color=bm_update_price.bulk_price_table_bg_color;let font_color=bm_update_price.bulk_price_table_font_color;let quantity_field=null;if(Cookies.get("woocommerce_show_tax")!==undefined&&Cookies.get("woocommerce_show_tax")!==null&&$("#wcvat-toggle").length){WoocommerceTaxToggle_setBulkPriceTableSelector();WoocommerceTaxToggle_watchToggle();WoocommerceTaxToggle_handleVariationTables()}function WoocommerceTaxToggle_setBulkPriceTableSelector(){showTaxVar=Cookies.get("woocommerce_show_tax");css_elector="product-tax-off";if("true"==showTaxVar){css_elector="product-tax-on"}bulk_price_table_selector="."+bm_update_price.bulk_price_table_class+"."+css_elector}function WoocommerceTaxToggle_disableClickEvents(){table_rows=$("."+bm_update_price.bulk_price_table_class+" tbody > tr");$(table_rows).unbind("click")}function WoocommerceTaxToggle_watchToggle(){$("#wcvat-toggle.wcvat-toggle-product").on("click",function(event){setTimeout(function(){WoocommerceTaxToggle_disableClickEvents();WoocommerceTaxToggle_setBulkPriceTableSelector();WoocommerceTaxToggle_handleVariationTables();handleBulkPriceTable();$(quantity_field).change()},100)})}function WoocommerceTaxToggle_handleVariationTables(){if($(".single_variation_wrap").length){$(".single_variation_wrap").on("show_variation",function(event,variation){showTaxVar=Cookies.get("woocommerce_show_tax");css_elector="product-tax-off";if("true"==showTaxVar){css_elector="product-tax-on"}bulk_price_table_selector="."+bm_update_price.bulk_price_table_class+":not(."+css_elector+")";$(".woocommerce-variation-bulk-prices table"+bulk_price_table_selector).hide();WoocommerceTaxToggle_disableClickEvents();WoocommerceTaxToggle_setBulkPriceTableSelector()})}}function updateBulkPriceTable(){let quantity=parseInt($(quantity_field).val());$.each($(bulk_table_rows),function(key,row){let bulk_quantity_from=parseInt($(this).find("td.quantity_from").text().replace(bm_update_price.wc_thousand_sep,""));let bulk_quantity_to=parseInt($(this).find("td.quantity_to").text().replace(bm_update_price.wc_thousand_sep,""));if(bulk_quantity_from<=quantity&&(bulk_quantity_to>=quantity||isNaN(bulk_quantity_to))){if(bulk_quantity_from<=quantity&&isNaN(bulk_quantity_to)){if($(this).next().find("td").length){if(!isNaN(bulk_quantity_to)){bulk_quantity_to=$(this).next().find("td.quantity_from").text()}if(bulk_quantity_from<=quantity&&bulk_quantity_to>quantity||bulk_quantity_from<=quantity&&isNaN(bulk_quantity_to)){$(row).css({"background-color":background_color,color:font_color});last_bulk_prices=$(row).index()}else{$(row).css({"background-color":"",color:""})}}else{$(row).css({"background-color":background_color,color:font_color});last_bulk_prices=$(row).index()}}else{$(row).css({"background-color":background_color,color:font_color});last_bulk_prices=$(row).index()}}else{$(row).css({"background-color":"",color:""});last_bulk_prices=false}})}function handleBulkPriceTable(){if($(bulk_price_table_selector).length){bulk_table_rows=$(bulk_price_table_selector+" tbody > tr");quantity_field=$("form.cart input.qty");initial_quantity=$(quantity_field).val();$(bulk_table_rows).css({cursor:"pointer"});$(bulk_table_rows).off("click");$(bulk_table_rows).on("click",function(){let bulk_quantity_from=parseInt($(this).find("td.quantity_from").text().replace(bm_update_price.wc_thousand_sep,""));let bulk_quantity_to=parseInt($(this).find("td.quantity_to").text().replace(bm_update_price.wc_thousand_sep,""));if(bulk_quantity_from<initial_quantity){bulk_quantity_from=initial_quantity}if(last_bulk_prices!==$(this).index()){$(bulk_table_rows).css({"background-color":"",color:""});$(this).css({"background-color":background_color,color:font_color});$(quantity_field).val(isNaN(bulk_quantity_to)||"min"==bulk_price_table_pick_min_max_qty?bulk_quantity_from:bulk_quantity_to);last_bulk_prices=$(this).index()}else{$(bulk_table_rows).css({"background-color":"",color:""});$(quantity_field).val(initial_quantity);last_bulk_prices=false}$(quantity_field).change()});updateBulkPriceTable()}}handleBulkPriceTable();function handleVariationSelect(){if($(".single_variation_wrap").length){if($(".single-product").length){var product=$(".single-product")}else if($(".woocommerce.product-content .product").length){var product=$(".woocommerce.product-content .product")}let price=$(".legacy-itemprop-offers");product.on("found_variation",".variations_form",function(){if($(".woocommerce-variation-bulk-prices").length){handleBulkPriceTable()}})}}handleVariationSelect();if($("#atomion-quick-view-modal").length){var target=$("#atomion-quick-view-modal")[0];let triggered=false;var observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){if("block"==$(target).css("display")){var newNodes=mutation.addedNodes;if(newNodes!==null){if($("form.cart input.qty").length&&!triggered){handleBulkPriceTable();handleVariationSelect();watchQtyInput();triggered=true;$("form.cart input.qty").change()}}}else{triggered=false}})});var config={attributes:true,childList:true,characterData:true};observer.observe(target,config)}$("body").on("wcpt_product_modal_ready",function(){if($("form.cart input.qty").length){handleBulkPriceTable();watchQtyInput();$("form.cart input.qty").change();$("body").on("found_variation",".variations_form",function(){if($(".woocommerce-variation-bulk-prices").length){handleBulkPriceTable()}})}});function watchQtyInput(){if($(".wpb_row form.cart.dynamic-button").length){let value=$(qty_element).val();if(value>0){if($(".wpb_row form.cart.dynamic-button button[name=add-to-cart]").length){$(".wpb_row form.cart.dynamic-button button[name=add-to-cart]").attr("data-quantity",value)}}}if($("select.wc-pao-addon-select").length){$("select.wc-pao-addon-select").on("change",function(){$(qty_element).change()})}const handleQuantityChangeDebounced=useDebounce(quantityChangeHandler,250);$(qty_element).on("change",handleQuantityChangeDebounced)}watchQtyInput();if(!isVariableProduct()){$(qty_element).change()}function isVariableProduct(){return $(".variation_id").length>0}function useDebounce(callback,wait){let state=undefined;return(...args)=>{if(!state){state={};state.promise=new Promise((resolve,reject)=>{state.resolve=resolve;state.reject=reject})}clearTimeout(state.timeout);state.latestArgs=args;state.timeout=setTimeout(()=>{const s=state;state=undefined;try{s.resolve(callback(...s.latestArgs))}catch(e){s.reject(e)}},wait);return state.promise}}function quantityChangeHandler(){var id=$("#current_id").data("id");var qty=$(qty_element).val();if(isVariableProduct()){id=current_variation_id}if(!id){return}if("woocommerce-grouped-product-list-item__quantity"==$(qty_element).parent().parent().attr("class")){return}var shortcode=false;var shortcode_show_sale=true;var shortcode_show_rrp=true;if($(".b2b-shortcode-product-group-price").length){shortcode=true;shortcode_show_sale="yes"==$(".b2b-shortcode-product-group-price").data("show_sale")?true:false;shortcode_show_rrp="yes"==$(".b2b-shortcode-product-group-price").data("show_rrp")?true:false}let addon_price=0;let addon_price_type=false;if($("select.wc-pao-addon-select").length){if($("select.wc-pao-addon-select").val()!=""){let option=$("select.wc-pao-addon-select option[value="+$("select.wc-pao-addon-select").val()+"]");addon_price=$(option).attr("data-price");addon_price_type=$(option).attr("data-price-type")}}current_request?.abort();current_request=$.ajax({type:"POST",url:bm_update_price.ajax_url,data:{action:"update_price",id:id,qty:qty,shortcode:shortcode,shortcode_show_sale:shortcode_show_sale,shortcode_show_rrp:shortcode_show_rrp,nonce:bm_update_price.nonce,addon_price:addon_price,addon_price_type:addon_price_type},dataType:"json",error:function(jQueryXHR){if(jQueryXHR.statusText==="abort"){return}current_request=null},success:function(data){current_request=null;if(0!=data){if(data["price_html"]){var product_id=$("#current_id").data("id");$('.b2b-shortcode-product-group-price[data-product_id="'+product_id+'"]').html(data["price_html"]);if(data["price_value"]>0){$('.b2b-shortcode-product-group-price[data-product_id="'+product_id+'"]').updatePrice(data)}return false}let price=data["price_value"];if("undefined"!==typeof price&&parseFloat(price.replace(",","."))>0){if($(bulk_price_table_selector).length){updateBulkPriceTable()}if("undefined"!==typeof $.epoAPI&&$.isFunction($.epoAPI.addFilter)&&"undefined"!==typeof data["tm_price"]){$.epoAPI.addFilter("tc_adjust_product_total_price_without_options",function(product_total_price){return data["tm_price"]*$(qty_element).val()},10,1);$(window).trigger("tm-do-epo-update")}if($(".wcpa_price_summary").length){if($(".single_variation_wrap").length){$(".single_variation_wrap .woocommerce-variation-price .price > .amount").replaceWith(data["price"])}$(".wcpa_price_summary .wcpa_product_total .wcpa_price").empty().html(data["price"]);let option_total=0;if($(".wcpa_price_summary .wcpa_options_total .price_value").length){option_total=parseFloat($(".wcpa_price_summary .wcpa_options_total .price_value").text().replace(",","."))}else{if($(".wcpa_form_outer .wcpa_form_item").length){let options=$(".wcpa_form_outer .wcpa_form_item input.wcpa_has_price:checked");$.each(options,function(index,item){let data=JSON.parse($(item).attr("data-price"));option_total+=parseFloat(data["value"])})}}let qty=$(qty_element).val();let b2b_price=data["price_value"];let price_total=((b2b_price+option_total)*qty).toFixed(2);$(".wcpa_price_summary .wcpa_total .price_value").html(price_total.toString().replace(".",","));if($(".bm-price-totals").lnegth){var replaced=$(".bm-price-totals bdi").html().replace(/([0-9]+[,|.][0-9]+)/g,price_total).replace(".",",");$(".bm-price-totals bdi").html(replaced)}if($(".wcpa_validate_field").length){$(".wcpa_validate_field input").on("change",function(){let option_total=0;if($(".wcpa_price_summary .wcpa_options_total .price_value").length){option_total=parseFloat($(".wcpa_price_summary .wcpa_options_total .price_value").text().replace(",","."))}else{if($(".wcpa_form_outer .wcpa_form_item").length){let options=$(".wcpa_form_outer .wcpa_form_item input.wcpa_has_price:checked");$.each(options,function(index,item){let data=JSON.parse($(item).attr("data-price"));option_total+=parseFloat(data["value"])})}}price_total=((b2b_price+option_total)*qty).toFixed(2);$(".wcpa_price_summary .wcpa_total .price_value").html(price_total.toString().replace(".",","));if($(".bm-price-totals").length){var replaced=$(".bm-price-totals bdi").html().replace(/([0-9]+[,|.][0-9]+)/g,price_total).replace(".",",");$(".bm-price-totals bdi").html(replaced)}})}}if($(".bundled_product").length>0){if($(".bundled_product").find(".variations")){return false}}if(typeof data["price_net"]!==undefined&&typeof data["price_gross"]!==undefined){if(!$(".single_variation_wrap").length){let net=".summary .price .bm-net";let gross=".summary .price .bm-gross";let update=false;if($(".summary > .legacy-itemprop-offers").length){let net=".summary > .legacy-itemprop-offers > .price .bm-net";let gross=".summary > .legacy-itemprop-offers > .price .bm-gross"}if($(net).length){$(net+" > .amount").replaceWith(data["price_net"]);update=true}if($(gross).length){$(gross+" > .amount").replaceWith(data["price_gross"]);update=true}if(update){return}}else{if("gm_sepcial"==bm_update_price.german_market_price_variable_products){selector="#german-market-variation-price "}else{selector=".woocommerce-variation-price"}if($(selector+" > .price .bm-net").length){$(selector+" > .price .bm-net > .amount").replaceWith(data["price_net"])}if($(selector+" > .price .bm-gross").length){$(selector+" > .price .bm-gross > .amount").replaceWith(data["price_gross"])}}}if(!$(".single_variation_wrap").length){if(Cookies.get("woocommerce_show_tax")!==undefined&&Cookies.get("woocommerce_show_tax")!==null&&$("#wcvat-toggle").length){let showTaxVar=Cookies.get("woocommerce_show_tax");let tooggle=$("#wcvat-toggle");let selector=$(tooggle).hasClass("on")?"on":"off";let css_elector="product-tax-"+selector;if($(".summary .price").length){let currency_span=$(".summary .price .amount span.woocommerce-Price-currencySymbol").prop("outerHTML");let price=data["price_value"]+"&nbsp;"+currency_span;if($(".summary .price del").length){$(".summary .price ins > .amount."+css_elector+" bdi").empty().html(price)}else{$(".summary .price > .amount."+css_elector+" bdi").empty().html(price)}}}else{if($(".summary .b2b-shortcode-product-price-additional-content .price-per-unit").length){if(undefined!=typeof data["ppu"]){$(".summary .b2b-shortcode-product-price-additional-content .price-per-unit .amount").replaceWith(data["ppu"])}}if($(".summary .b2b-shortcode-product-price > .price").length){if($(".summary .b2b-shortcode-product-price > .price del").length){$(".summary .b2b-shortcode-product-price > .price > ins > .amount").replaceWith(data["price"])}else{$(".summary .b2b-shortcode-product-price > .price > .amount").replaceWith(data["price"])}}else if($(".summary > .legacy-itemprop-offers > .price").length){$(".summary > .legacy-itemprop-offers").updatePrice(data,".wc-gzd-additional-info")}else if($(bm_update_price.theme_css_selector_price_element).length){selector=bm_update_price.theme_css_selector_price_element;if($(selector+" del").length){$(selector+" > div:not(.b2b-rrp) ins > .amount").replaceWith(data["price"]);if($(selector+" > ins").length){$(selector+" > ins > .amount").replaceWith(data["price"])}}else{$(selector+" > div:not(.b2b-rrp) .amount").replaceWith(data["price"]);if($(selector+" > .amount").length){$(selector+" > .amount").replaceWith(data["price"])}}}else if($(".summary .price:not(.price-unit)").length){var selector=".summary";if($(selector+" .price:not(.price-unit) del").length){$(selector+" .price:not(.price-unit) > div:not(.b2b-rrp) ins > .amount").replaceWith(data["price"]);if($(selector+" .price:not(.price-unit) > ins").length){$(selector+" .price:not(.price-unit) > ins > .amount").replaceWith(data["price"])}}else{$(selector+" .price:not(.price-unit) > div:not(.b2b-rrp) .amount").replaceWith(data["price"]);if($(selector+" .price:not(.price-unit) > .amount").length){$(selector+" .price:not(.price-unit) > .amount").replaceWith(data["price"])}}}else if($(".summary > .price:not(.price-unit)").length){var selector=".summary";if($(selector+" > .price:not(.price-unit) del").length){$(selector+" > .price:not(.price-unit) > div:not(.b2b-rrp) ins > .amount").replaceWith(data["price"]);if($(selector+" > .price:not(.price-unit) > ins").length){$(selector+" > .price:not(.price-unit) > ins > .amount").replaceWith(data["price"])}}else{$(selector+" > .price:not(.price-unit) > div:not(.b2b-rrp) .amount").replaceWith(data["price"]);if($(selector+" > .price:not(.price-unit) > .amount").length){$(selector+" > .price:not(.price-unit) > .amount").replaceWith(data["price"])}}}else if($(".summary > .summary-inner > .price").length){selector=".summary > .summary-inner";if($(selector+" > .price del").length){$(selector+" > .price > div:not(.b2b-rrp) ins > .amount").replaceWith(data["price"]);if($(selector+" > .price > ins").length){$(selector+" > .price > ins > .amount").replaceWith(data["price"])}}else{$(selector+" > .price > div:not(.b2b-rrp) .amount").replaceWith(data["price"]);if($(selector+" > .price > .amount").length){$(selector+" > .price > .amount").replaceWith(data["price"])}}}else if($(".cornerstone-builder.summary > .x-div > .x-div > .price").length){selector=".cornerstone-builder.summary > .x-div > .x-div ";if($(selector+" > .price del").length){$(selector+" > .price  > div:not(.b2b-rrp) ins > .amount").replaceWith(data["price"]);if($(selector+" > .price > ins").length){$(selector+" > .price > ins > .amount").replaceWith(data["price"])}}else{$(selector+" > .price  > div:not(.b2b-rrp) .amount").replaceWith(data["price"]);if($(selector+" > .price > .amount").length){$(selector+" > .price > .amount").replaceWith(data["price"])}}}if($(".wpb_wrapper .product_field.price").length){selector=".wpb_wrapper";if($(selector+" > .price:not(.wc-gzd-additional-info) del").length){$(selector+" > .price:not(.wc-gzd-additional-info) > div:not(.b2b-rrp) ins > .amount").replaceWith(data["price"]);if($(selector+" > .price:not(.wc-gzd-additional-info) > ins").length){$(selector+" > .price:not(.wc-gzd-additional-info) > ins > .amount").replaceWith(data["price"])}}else{$(selector+" > .price:not(.wc-gzd-additional-info) > div:not(.b2b-rrp) .amount").replaceWith(data["price"]);if($(selector+" > .price:not(.wc-gzd-additional-info) > .amount").length){$(selector+" > .price:not(.wc-gzd-additional-info) > .amount").replaceWith(data["price"])}}}}}else{if(Cookies.get("woocommerce_show_tax")!==undefined&&Cookies.get("woocommerce_show_tax")!==null&&$("#wcvat-toggle").length){let showTaxVar=Cookies.get("woocommerce_show_tax");let tooggle=$("#wcvat-toggle");let selector=$(tooggle).hasClass("on")?"on":"off";let css_elector="product-tax-"+selector;if($(".woocommerce-variation-price .price").length){let currency_span=$(".woocommerce-variation-price .price .amount span.woocommerce-Price-currencySymbol").prop("outerHTML");let price=data["price_value"]+"&nbsp;"+currency_span;if($(".woocommerce-variation-price .price del").length){$(".woocommerce-variation-price .price ins > .amount."+css_elector+" bdi").empty().html(price)}else{$(".woocommerce-variation-price .price > .amount."+css_elector+" bdi").empty().html(price)}}}else{if(typeof data["rrp"]!=="undefined"){if($(".summary > .b2b-rrp").length){$(".summary > .b2b-rrp").replaceWith(data["rrp"])}else{$(".summary > .price:not(.wc-gzd-additional-info)").before(data["rrp"])}}else{if($(".summary > .price.wc-gzd-additional-info").length){if($(".summary > .b2b-rrp").length){$(".summary > .b2b-rrp").remove()}}}var selector=".woocommerce-variation-price";if("gm_sepcial"==bm_update_price.german_market_price_variable_products){selector="#german-market-variation-price"}if(".summary > .price"==bm_update_price.theme_css_selector_price_element&&$(bm_update_price.theme_css_selector_price_element).length&&(!$(".woocommerce-variation-price > .price").length||$(".woocommerce-variation-price").css("display")=="none")){selector=".summary"}if($(".summary > .summary-inner > .price").length){selector=".summary > .summary-inner"}if($(".cornerstone-builder.summary > .x-div > .x-div > .price").length){selector=".cornerstone-builder.summary > .x-div > .x-div "}if($(".wpb_wrapper .product_field.price").length){selector=".wpb_wrapper";if($(selector+" > .price:not(.wc-gzd-additional-info) del").length){$(selector+" > .price:not(.wc-gzd-additional-info) > div:not(.b2b-rrp) ins > .amount").replaceWith(data["price"]);if($(selector+" > .price:not(.wc-gzd-additional-info) > ins").length){$(selector+" > .price:not(.wc-gzd-additional-info) > ins > .amount").replaceWith(data["price"])}}else{$(selector+" > .price:not(.wc-gzd-additional-info) > div:not(.b2b-rrp) .amount").replaceWith(data["price"]);if($(selector+" > .price:not(.wc-gzd-additional-info) > .amount").length){$(selector+" > .price:not(.wc-gzd-additional-info) > .amount").replaceWith(data["price"])}}}if($(selector+" > .price").length){if($(selector+" > .price:not(.wc-gzd-additional-info) del").length){if(/<del(\s.+)?>/.test(data["price"])){let sale_label="";let b2b_rrp="";let price_suffix="";if($(selector+" > .price:not(.wc-gzd-additional-info) .b2b-rrp").length){b2b_rrp=$(selector+" > .price:not(.wc-gzd-additional-info) .b2b-rrp").prop("outerHTML")+"<br>"}if($(selector+" > .price:not(.wc-gzd-additional-info) .wgm-sale-label").length){sale_label=$(selector+" > .price:not(.wc-gzd-additional-info) .wgm-sale-label").prop("outerHTML")+" "}if($(selector+" > .price:not(.wc-gzd-additional-info) .woocommerce-price-suffix").length){price_suffix=$(selector+" > .price:not(.wc-gzd-additional-info) .woocommerce-price-suffix").prop("outerHTML")}$(selector+" > .price:not(.wc-gzd-additional-info)").html(b2b_rrp+sale_label+data["price"]+price_suffix)}else{if($(selector+" > .price:not(.wc-gzd-additional-info) .wc-gzd-sale-price-label").length){$(selector+" > .price:not(.wc-gzd-additional-info) .wc-gzd-sale-price-label").remove()}if($(selector+" > .price:not(.wc-gzd-additional-info) del").length){$(selector+" > .price:not(.wc-gzd-additional-info) del").remove()}if($(selector+" > .price:not(.wc-gzd-additional-info) ins").length){$(selector+" > .price:not(.wc-gzd-additional-info) ins").replaceWith(data["price"])}else{$(selector+" > .price:not(.wc-gzd-additional-info) .amount").replaceWith(data["price"])}}}else{if($(selector+" > .price:not(.wc-gzd-additional-info) > .amount").length>1){if(typeof data["price_net"]===undefined&&typeof data["price_gross"]===undefined){$(selector+" > .price:not(.wc-gzd-additional-info)").html(data["price"])}}else{$(selector+" > .price > .amount").replaceWith(data["price"])}}if($(selector+" > .price-per-unit").length){if("undefined"!=typeof data["ppu"]){$(selector+" > .price-per-unit .amount").replaceWith(data["ppu"]);$(selector+" > .price-per-unit").show()}else{$(selector+" > .price-per-unit").hide()}}}if(".summary > .price"!=bm_update_price.theme_css_selector_price_element&&$(bm_update_price.theme_css_selector_price_element).length){if($(bm_update_price.theme_css_selector_price_element+" del").length){$(bm_update_price.theme_css_selector_price_element+" ins > .amount").replaceWith(data["price"])}else{if($(bm_update_price.theme_css_selector_price_element+" > .amount").length>1){$(bm_update_price.theme_css_selector_price_element+":not(.wc-gzd-additional-info)").html(data["price"])}else{$(bm_update_price.theme_css_selector_price_element+" > .amount").replaceWith(data["price"])}}if($(bm_update_price.theme_css_selector_price_per_unit_element).length){$(bm_update_price.theme_css_selector_price_per_unit_element).replaceWith(data["ppu"])}}}}if($(".av-woo-purchase-button > .price").length){$(".av-woo-purchase-button > .price > .amount").replaceWith(data["price"]);if($(".av-woo-purchase-button > .legacy-itemprop-offers .price-per-unit").length){$(".av-woo-purchase-button > .legacy-itemprop-offers .price-per-unit .amount").replaceWith(data["ppu"])}}if($(".module-product-price .price").length){$(".module-product-price").updatePrice(data);if($(".woocommerce-variation-price").length){$(".woocommerce-variation .price > .amount").replaceWith(data["price"])}}if($('.elementor-widget-wrap div[data-widget_type="woocommerce-product-price.default"]').length||$('.elementor-widget-wrap div[data-widget_type="text-editor.default"] .price').length){if(!$(".elementor-widget-wrap .single_variation_wrap").length){if($('div[data-widget_type="woocommerce-product-price.default"] .elementor-widget-container .price').length){$('div[data-widget_type="woocommerce-product-price.default"] .elementor-widget-container').updatePrice(data)}if($('div[data-widget_type="text-editor.default"] .elementor-widget-container .price').length){$('div[data-widget_type="text-editor.default"] .elementor-widget-container').updatePrice(data)}}}if($('div[data-widget_type="woocommerce-product-add-to-cart.default"] .elementor-widget-container .woocommerce-variation-price > .price').length){$('div[data-widget_type="woocommerce-product-add-to-cart.default"] .elementor-widget-container .woocommerce-variation-price > .price').html(data["price"])}else if($(".summary-container .price").length){$(".summary-container").updatePrice(data);$(".summary-container .price-per-unit .amount").replaceWith(data["ppu"])}else if($(".et_pb_module.et_pb_wc_price > .et_pb_module_inner > .price").length){if(!$(".single_variation_wrap").length){if($(".et_pb_module.et_pb_wc_price > .et_pb_module_inner > .price del").length){$(".et_pb_module.et_pb_wc_price > .et_pb_module_inner > .price ins").empty().html(data["price"])}else{$(".et_pb_module.et_pb_wc_price > .et_pb_module_inner > .price > .amount").replaceWith(data["price"])}}}else if($(".et_pb_module > .et_pb_module_inner > .price").length){if($(".et_pb_module > .et_pb_module_inner > .price del").length){$(".et_pb_module > .et_pb_module_inner > .price ins").empty().html(data["price"])}else{$(".et_pb_module > .et_pb_module_inner > .price .amount").replaceWith(data["price"])}$(".et_pb_module_inner .price-per-unit .amount").replaceWith(data["ppu"]);if($(".woocommerce-variation-price").length){$(".woocommerce-variation-price .price .amount").replaceWith(data["price"])}}else if($(".fusion-woo-price-tb .price").length){$(".fusion-woo-price-tb").updatePrice(data)}else if($(".fusion-woo-price-tb .price").length){$(".fusion-woo-price-tb").updatePrice(data)}else if($(".uncont .price").length){if($(".uncont .t-entry-text").length==0){$(".uncont").updatePrice(data)}}if($(".row-parent.product .uncont .price").length==0){if($(".row-parent.product .uncont del").length){$(".row-parent.product .uncont ins > .amount").replaceWith(data["price"])}else{if($(".row-parent.product .uncont div .amount").length==1){$(".row-parent.product .uncont div .amount").replaceWith(data["price"])}}}else if($(".uk-grid-item-match .price").length){$(".uk-grid-item-match").updatePrice(data)}else if($(".summary-product .price").length){$(".summary-product").updatePrice(data);$(".summary-product .price-per-unit .amount").replaceWith(data["ppu"]);if($(".woocommerce-variation.single_variation").length){$(".woocommerce-variation.single_variation .woocommerce-variation-price .price > .amount").replaceWith(data["price"])}}else if($(".product-summary .price").length){$(".product-summary").updatePrice(data);$(".product-summary .price-per-unit .amount").replaceWith(data["ppu"])}else if($(".woocommerce-variation.single_variation").length){$(".woocommerce-variation.single_variation .woocommerce-variation-price .price > .amount").replaceWith(data["price"])}else if($(".product-price-container .product-page-price").length){$(".product-price-container .product-page-price .amount").replaceWith(data["price"])}if($(".price-wrapper > .product-page-price.price").length){if($(".price-wrapper > .product-page-price.price > .amount").length>1){$(".price-wrapper > .product-page-price.price").empty().html(data["price"])}else{$(".price-wrapper > .product-page-price.price > .amount").replaceWith(data["price"])}}if($(".bm-price-totals").length){if(data["totals"]!=""){$(".bm-price-totals > span.totals-price").empty().html(data["totals"])}$(".bm-price-totals").show()}}}}})}$(".single_variation_wrap").on("show_variation",function(event,variation){if($(".bm-price-totals").length){$(".bm-price-totals").show()}})});