
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="41a18eaf-0d18-5deb-8b6f-65d429e6e897")}catch(e){}}();
(()=>{"use strict";const e=".wcshipping-checkout-notice--address-validation";let o,t=!1;const r=(o=document,{preserveExistingTargetNotices:t=!1}={})=>{const r=Array.from(o.querySelectorAll(".wcshipping-checkout-address-validation-notices")),n=((e,o)=>{var t;if(0===o.length)return null;const r=e.querySelector(".wcshipping-checkout-address-validation-notices--shipping");if((e=>{const o=e.querySelector("#ship-to-different-address-checkbox");return Boolean(o?.checked)})(e)&&r)return r;const n=e.querySelector(".wcshipping-checkout-address-validation-notices--billing");return null!==(t=null!=n?n:r)&&void 0!==t?t:o[0]})(o,r);if(!n)return null;const c=Array.from(o.querySelectorAll(e)).filter((e=>!r.some((o=>o.contains(e)))));return t&&0===c.length?(r.forEach((e=>{e!==n&&e.replaceChildren()})),n.querySelector(e)?n:null):(r.forEach((e=>e.replaceChildren())),c.forEach((e=>{n.appendChild((e=>{const o=e.closest(".wc-block-components-notice-banner, .woocommerce-info, .woocommerce-message, .woocommerce-error");var t;if(!o)return null!==(t=e.parentElement)&&void 0!==t?t:e;if(o.matches(".woocommerce-error")){const t=e.closest("li");if(t&&o.children.length>1){const e=o.cloneNode(!1);return e.appendChild(t),e}}return o})(e))})),c.length>0?n:null)},n=()=>{t=!1,o&&(window.clearTimeout(o),o=void 0)},c=(e=!1)=>{e&&(t=!0,o&&window.clearTimeout(o),o=window.setTimeout((()=>{n()}),5e3)),window.setTimeout((()=>{(e=>{t&&e&&(n(),"scrollIntoView"in e&&"function"==typeof e.scrollIntoView&&(window.jQuery?.("html, body").stop?.(!0),e.scrollIntoView({block:"center"})))})(r(document,{preserveExistingTargetNotices:!0}))}),0)},i=()=>{n(),r(),window.jQuery&&window.jQuery(document.body).on("updated_checkout checkout_error",((e,o)=>{c("checkout_error"===e?.type||"updated_checkout"===e?.type&&"failure"===o?.result)}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",i,{once:!0}):i()})();
//# sourceMappingURL=woocommerce-shipping-checkout-address-validation-classic.js.map
//# debugId=41a18eaf-0d18-5deb-8b6f-65d429e6e897
