// source --> https://www.empfehlio.de/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js?ver=10.8.1 
jQuery(function(t){if("undefined"==typeof wc_add_to_cart_params)return!1;var a=function(){this.requests=[],this.addRequest=this.addRequest.bind(this),this.run=this.run.bind(this),this.$liveRegion=this.createLiveRegion(),t(document.body).on("click",".add_to_cart_button:not(.wc-interactive)",{addToCartHandler:this},this.onAddToCart).on("keydown",".add_to_cart_button:not(.wc-interactive)",{addToCartHandler:this},t=>{" "===t.key&&(t.preventDefault(),t.target.click())}).on("click",".remove_from_cart_button",{addToCartHandler:this},this.onRemoveFromCart).on("keydown",".remove_from_cart_button",this.onKeydownRemoveFromCart).on("added_to_cart",{addToCartHandler:this},this.onAddedToCart).on("removed_from_cart",{addToCartHandler:this},this.onRemovedFromCart).on("ajax_request_not_sent.adding_to_cart",this.updateButton)};a.prototype.addRequest=function(t){this.requests.push(t),1===this.requests.length&&this.run()},a.prototype.run=function(){var a=this,e=a.requests[0].complete;a.requests[0].complete=function(){"function"==typeof e&&e(),a.requests.shift(),a.requests.length>0&&a.run()},t.ajax(this.requests[0])},a.prototype.onAddToCart=function(a){var e=t(this);if(e.is(".ajax_add_to_cart")){if(!e.attr("data-product_id"))return!0;if(a.data.addToCartHandler.$liveRegion.text("").removeAttr("aria-relevant"),a.preventDefault(),e.removeClass("added"),e.addClass("loading"),!1===t(document.body).triggerHandler("should_send_ajax_request.adding_to_cart",[e]))return t(document.body).trigger("ajax_request_not_sent.adding_to_cart",[!1,!1,e]),!0;var r={};t.each(e.data(),function(t,a){r[t]=a}),t.each(e[0].dataset,function(t,a){r[t]=a}),t(document.body).trigger("adding_to_cart",[e,r]),a.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),data:r,success:function(a){a&&(a.error&&a.product_url?window.location=a.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?t(document.body).trigger("added_to_cart",[a.fragments,a.cart_hash,e]):window.location=wc_add_to_cart_params.cart_url)},dataType:"json"})}},a.prototype.onRemoveFromCart=function(a){var e=t(this),r=e.closest(".woocommerce-mini-cart-item");a.data.addToCartHandler.$liveRegion.text("").removeAttr("aria-relevant"),a.preventDefault(),r.block({message:null,overlayCSS:{opacity:.6}}),a.data.addToCartHandler.addRequest({type:"POST",url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),data:{cart_item_key:e.data("cart_item_key")},success:function(a){a&&a.fragments?t(document.body).trigger("removed_from_cart",[a.fragments,a.cart_hash,e]):window.location=e.attr("href")},error:function(){window.location=e.attr("href")},dataType:"json"})},a.prototype.onKeydownRemoveFromCart=function(a){" "===a.key&&(a.preventDefault(),t(this).trigger("click"))},a.prototype.updateButton=function(a,e,r,o){if(o=void 0!==o&&o){if(o.removeClass("loading"),e&&o.addClass("added"),e&&!wc_add_to_cart_params.is_cart&&0===o.parent().find(".added_to_cart").length){var d=document.createElement("a");d.href=wc_add_to_cart_params.cart_url,d.className="added_to_cart wc-forward",d.title=wc_add_to_cart_params.i18n_view_cart,d.textContent=wc_add_to_cart_params.i18n_view_cart,o.after(d)}t(document.body).trigger("wc_cart_button_updated",[o])}},a.prototype.updateFragments=function(a,e){e&&(t.each(e,function(a){t(a).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),t.each(e,function(a,e){t(a).replaceWith(e),t(a).stop(!0).css("opacity","1").unblock()}),t(document.body).trigger("wc_fragments_loaded"))},a.prototype.alertCartUpdated=function(t,a,e,r){if(r=void 0!==r&&r){var o=r.data("success_message");if(!o)return;t.data.addToCartHandler.$liveRegion.delay(1e3).text(o).attr("aria-relevant","all")}},a.prototype.createLiveRegion=function(){var a=t(".widget_shopping_cart_live_region");return a.length?a:t('<div class="widget_shopping_cart_live_region screen-reader-text" role="status"></div>').appendTo("body")},a.prototype.onAddedToCart=function(t,a,e,r){t.data.addToCartHandler.updateButton(t,a,e,r),t.data.addToCartHandler.updateFragments(t,a),t.data.addToCartHandler.alertCartUpdated(t,a,e,r)},a.prototype.onRemovedFromCart=function(t,a,e,r){t.data.addToCartHandler.updateFragments(t,a),t.data.addToCartHandler.alertCartUpdated(t,a,e,r)},new a});
// source --> https://www.empfehlio.de/wp-content/plugins/woocommerce/assets/js/js-cookie/js.cookie.min.js?ver=2.1.4-wc.10.8.1 
/*! js-cookie v3.0.5 | MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}return function t(n,o){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+c}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var i=t[r].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(o[u]=n.read(c,u),e===u)break}catch(f){}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})});
// source --> https://www.empfehlio.de/wp-content/plugins/woocommerce-german-market/add-ons/woocommerce-shipping/includes/provider/dhl/assets/js/frontend.min.js?ver=3.51.2 
(function($,window,document){"use strict";function parcelChange(){let $wc_shipping_dhl_parcels_terminal=$("#wc_shipping_dhl_parcels_terminal");let cod=0;cod=$wc_shipping_dhl_parcels_terminal.find(":selected").data("cod");$(document).on("change","#wc_shipping_dhl_parcels_terminal",function(){let $this=$(this);cod=$this.find(":selected").data("cod");set_session(cod)})}function shipping_method_change(){$("form.checkout").on("change",'input[name^="shipping_method"]',function(){var val=$(this).val();if($("form.checkout #age-rating-exists").length){let is_dpd="wgm_dpd"===val.substring(0,7)?true:false;let is_dhl="dhl_"===val.substring(0,4)?true:false;if(is_dpd||is_dhl){if(is_dhl){if("dhl_home"===val.substring(0,8)&&$("#ship-to-different-address-checkbox").is(":checked")){$("#ship-to-different-address label").trigger("click");$("#ship-to-different-address-checkbox").prop("checked",false)}if($("form.checkout #billing_dob").length){$("form.checkout #billing_dob").closest("p").show()}else{$(document.body).on("updated_checkout",function(){location.reload()})}}else if(is_dpd){$("form.checkout #billing_dob").closest("p").hide()}}else{$("form.checkout #billing_personal_id").closest("p").hide();$("form.checkout #billing_dob").closest("p").hide()}}else{let is_dhl="dhl_"===val.substring(0,4)?true:false;if(is_dhl){if("dhl_home"===val.substring(0,8)&&$("#ship-to-different-address-checkbox").is(":checked")){$("#ship-to-different-address label").trigger("click");$("#ship-to-different-address-checkbox").prop("checked",false);if($("#ship-to-different-address span.atomion-checkbox-style").length){if(!$("#ship-to-different-address span.atomion-checkbox-style").removeClass("checked")){$("#ship-to-different-address span.atomion-checkbox-style").removeClass("checked")}}}else if("dhl_home"!==val.substring(0,8)&&!$("#ship-to-different-address-checkbox").is(":checked")){if(""!=$("#shipping_address_1").val()){$("#ship-to-different-address label").trigger("click");$("#ship-to-different-address-checkbox").prop("checked",true);if($("#ship-to-different-address span.atomion-checkbox-style").length){if(!$("#ship-to-different-address span.atomion-checkbox-style").addClass("checked")){$("#ship-to-different-address span.atomion-checkbox-style").addClass("checked")}}}}}}set_session(1)})}function payment_method_observer(){if($("#order_review #payment").length){var target=$("#order_review")[0];let is_selected=$("#payment_method_cash_on_delivery").is(":checked")?true:false;var observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){if($("#payment_method_cash_on_delivery").length){is_selected=$("#payment_method_cash_on_delivery").is(":checked")?true:false}var newNodes=mutation.addedNodes;if(newNodes!==null){if($("#payment_method_cash_on_delivery").length==0&&is_selected===true){var infoBox=$("<ul/>",{id:"paymenth_method_change_info_box",class:"woocommerce-error"});infoBox.html("<li>"+dpd.info_box_string+"</li>");if($("#paymenth_method_change_info_box").length==0){$("#order_review > #payment").after(infoBox)}}else{if($("#paymenth_method_change_info_box").length){$("#paymenth_method_change_info_box").remove()}}}})});var config={attributes:true,childList:true,characterData:true};observer.observe(target,config)}}function payment_method_change(){$(document.body).on("change","[name='payment_method']",function(){$(document.body).trigger("update_checkout")})}function set_session(cod){let data={action:"set_checkout_session",cod:cod};let obj=null;if(typeof wc_checkout_params!=="undefined"){obj=wc_checkout_params}else if(typeof wc_cart_params!=="undefined"){obj=wc_cart_params}if(obj!==null){$.post(obj.ajax_url,data,function(){setTimeout(function(){$(document.body).trigger("update_checkout")},300)})}}function timeShiftChange(){$(document.body).on("change","[name='wc_shipping_dhl_home_delivery_shifts']",function(){$(document.body).trigger("update_checkout")})}$(function(){parcelChange();shipping_method_change();payment_method_change();payment_method_observer();timeShiftChange();if($("#order_review").length){let obj=null;if(typeof wc_checkout_params!=="undefined"){obj=wc_checkout_params}else if(typeof wc_cart_params!=="undefined"){obj=wc_cart_params}var locked=false;var target=$("#order_review")[0];var observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){var newNodes=mutation.addedNodes;if(newNodes!==null){if($("select.advanced-select").length){$("select.advanced-select").each(function(){$(this).advancedSelect()})}if($("#wgm_dhl_service_preferred_day").length){$("#wgm_dhl_service_preferred_day").on("change",function(event){if(!locked){locked=true;if($(this).val()!=""){var data={action:"apply_preferred_delivery_date_fee",fee:"add",day:$(this).val()}}else{var data={action:"apply_preferred_delivery_date_fee",fee:"remove",day:""}}$.post(obj.ajax_url,data,function(data){locked=false;if(data.success===false){$("#wgm_dhl_service_preferred_day").val("")}$(document.body).trigger("update_checkout")})}})}else{var data={action:"apply_preferred_delivery_date_fee",fee:"remove",day:""};$.post(obj.ajax_url,data,function(data){$(document.body).trigger("update_checkout")})}}})});var config={attributes:true,childList:true,characterData:true};observer.observe(target,config)}})})(window.jQuery,window,document);