(()=>{var e={};(()=>{var t;globalThis.importScripts&&(t=globalThis.location+"");var r=globalThis.document;if(!t&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(t=r.currentScript.src),!t)){var n=r.getElementsByTagName("script");if(n.length)for(var a=n.length-1;a>-1&&(!t||!/^http(s?):/.test(t));)t=n[a--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t})(),e.p=window.wcpayAssets.url,(()=>{"use strict";window.wp.domReady;const e=e=>"undefined"!=typeof wcpayConfig&&void 0!==wcpayConfig[e]?wcpayConfig[e]:t(e),t=e=>{let t=null;if("undefined"!=typeof wcpay_upe_config)t=wcpay_upe_config;else{if("object"!=typeof wc||void 0===wc.wcSettings)return null;t=wc.wcSettings.getSetting("woocommerce_payments_data")||{}}return t[e]||null},r=e=>"object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(e)?wcpayExpressCheckoutParams[e]:null,n=["checkout_place_order_button_click"],a=()=>{const e=window;return e.wcpayShopperEventsQueue||(e.wcpayShopperEventsQueue={events:[]}),e.wcpayShopperEventsQueue},i=(t=!1)=>{const n=a();if(clearTimeout(n.flushTimer),n.flushTimer=void 0,n.firstQueuedAt=void 0,0===n.events.length)return;const i=n.events.splice(0,n.events.length),o=e("platformTrackerNonce")??r("nonce")?.platform_tracker,s=e("ajaxUrl")??r("ajax_url"),c=new FormData;c.append("tracksNonce",o),c.append("action","platform_tracks"),c.append("tracksEvents",JSON.stringify(i)),t&&navigator.sendBeacon?.(s,c)||fetch(s,{method:"post",body:c,keepalive:!0}).catch(()=>{})},o=(t,o={})=>{if(!1===(e("isShopperTrackingEnabled")??r("is_shopper_tracking_enabled")))return;const s=a();if(s.events.push({name:t,properties:o}),s.hasPageHideListeners||(s.hasPageHideListeners=!0,window.addEventListener("pagehide",()=>i(!0)),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&i(!0)})),s.events.length>=20||n.includes(t))return void i();const c=Date.now();void 0===s.firstQueuedAt&&(s.firstQueuedAt=c),clearTimeout(s.flushTimer),s.flushTimer=setTimeout(i,Math.min(2e3,s.firstQueuedAt+5e3-c))};if(window.wcPayFrontendTracks&&window.wcPayFrontendTracks.length){for(const e of window.wcPayFrontendTracks)o(e.event,e.properties);window.wcPayFrontendTracks=[]}})()})();