Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the emailkit domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-includes/functions.php on line 6260
Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-includes/functions.php:6260) in /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-content/plugins/jetpack-boost/app/lib/minify/functions-service.php on line 24
Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-includes/functions.php:6260) in /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-content/plugins/jetpack-boost/app/lib/minify/functions-service.php on line 24
Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-includes/functions.php:6260) in /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-content/plugins/jetpack-boost/app/lib/minify/functions-service.php on line 32
Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-includes/functions.php:6260) in /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-content/plugins/jetpack-boost/app/lib/minify/functions-service.php on line 33
Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-includes/functions.php:6260) in /homepages/35/d1003416524/htdocs/clickandbuilds/Unevaguedecreation/wp-content/plugins/jetpack-boost/app/lib/minify/functions-service.php on line 34
(()=>{var e={};(()=>{var t;globalThis.importScripts&&(t=globalThis.location+"");var s=globalThis.document;if(!t&&s&&(s.currentScript&&"SCRIPT"===s.currentScript.tagName.toUpperCase()&&(t=s.currentScript.src),!t)){var o=s.getElementsByTagName("script");if(o.length)for(var a=o.length-1;a>-1&&(!t||!/^http(s?):/.test(t));)t=o[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},s=e=>"object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(e)?wcpayExpressCheckoutParams[e]:null,o=(e,t,s="wcpay_")=>e.toString().replace("%%endpoint%%",s+t);function a(e,t="",s){for(const o in e){const n=e[o],i=t?t+"["+o+"]":o;"string"==typeof n||"number"==typeof n?s.append(i,n):"object"==typeof n&&a(n,i,s)}return s}async function n(e,t,s){const o=a(t,"",new FormData),n=await fetch(e,{method:"POST",body:o,...s});return await n.json()}const i=window.React,r=window.wp.i18n;function c(e){window.WooPayConnect||(window.WooPayConnect={}),window.WooPayConnect.iframeInjectedState=e}function l(){return window?.WooPayConnect?.postMessageTimeout||5e3}const d=window.ReactJSXRuntime,u=()=>{const t=(0,i.useRef)(),[o,a]=(0,i.useState)("");return(0,i.useEffect)(()=>{(async()=>{const t=e("testMode"),o=e("woopayHost"),n=e("woopayMerchantId"),i=new URLSearchParams({testMode:t,source_url:window.location.href,blogId:n}),r=await(async()=>{let t=(()=>{const e=document.cookie.split(";");for(let t=0;t{if(!o||!t.current)return;const s=t.current,a=()=>{c(2),window.dispatchEvent(new MessageEvent("message",{source:window,origin:e("woopayHost"),data:{action:"get_iframe_post_message_success",value:t=>s.contentWindow.postMessage(t,e("woopayHost"))}}))};return s.addEventListener("load",a),()=>{s.removeEventListener("load",a)}},[o]),o?(0,d.jsx)("iframe",{ref:t,id:"woopay-connect-iframe",src:o,style:{height:0,width:0,border:"none",margin:0,padding:0,overflow:"hidden",display:"block",visibility:"hidden",position:"fixed",pointerEvents:"none",userSelect:"none"},title:(0,r.__)("WooPay Connect Direct Checkout","woocommerce-payments")}):null},h=window.ReactDOM,y=class{iframePostMessage=null;listeners={};constructor(){this.listeners={getIframePostMessageCallback:()=>{},getPostMessageTimeoutCallback:()=>{}},this.removeMessageListener=this.attachMessageListener(),this.injectWooPayConnectIframe()}attachMessageListener(){const t=t=>{const s=new URL(e("woopayHost")).origin;t.origin===s&&this.callbackFn(t.data)};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}}detachMessageListener(){"function"==typeof this.removeMessageListener&&this.removeMessageListener()}injectWooPayConnectIframe(){const t=window?.WooPayConnect?.iframeInjectedState||0;if(2===t){const t=document.querySelector("#woopay-connect-iframe");return void(t&&(this.iframePostMessage=Promise.resolve(s=>{t.contentWindow.postMessage(s,e("woopayHost"))})))}if(1===t)return void(this.iframePostMessage=new Promise(e=>{this.listeners.getIframePostMessageCallback=e}));c(1);const s=document.createElement("div");s.style.visibility="hidden",s.style.position="fixed",s.style.height="0",s.style.width="0",s.style.bottom="0",s.style.right="0",s.id="woopay-connect-iframe-container",document.body.appendChild(s);const o=this;this.iframePostMessage=new Promise(e=>{o.listeners.getIframePostMessageCallback=e}),(0,h.createRoot)(s).render((0,d.jsx)(u,{}))}injectTemporaryWooPayConnectIframe(){let t;const s=new Promise(e=>{t=e}),o=document.createElement("iframe");return o.id="temp-woopay-connect-iframe",o.src=e("woopayHost")+"/connect/",o.height=0,o.width=0,o.border="none",o.margin=0,o.padding=0,o.overflow="hidden",o.display="block",o.visibility="hidden",o.position="fixed",o.pointerEvents="none",o.userSelect="none",o.addEventListener("load",()=>{t(t=>o.contentWindow.postMessage(t,e("woopayHost")))}),document.body.appendChild(o),{resolvePostMessagePromise:s,removeTemporaryIframe:()=>{document.body.removeChild(o)}}}async sendMessageAndListenWith(e,t){const s=new Promise((e,s)=>{let o=!1;const a=setTimeout(()=>{o=!0,s(new Error("WooPayConnectIframe did not respond within the allotted time."))},l());this.listeners[t]=t=>{o||(a&&clearTimeout(a),e(t))}});if("function"!=typeof this.iframePostMessage?.then)throw new Error("iframePostMessage is not set");return(await this.iframePostMessage)(e),await s}async getPostMessageTimeout(){try{return await this.sendMessageAndListenWith({action:"getPostMessageTimeout"},"getPostMessageTimeoutCallback")}catch(e){return null}}callbackFn(e){switch(e.action){case"get_iframe_post_message_success":this.listeners.getIframePostMessageCallback(e.value);break;case"get_post_message_timeout_success":this.listeners.getPostMessageTimeoutCallback(e.value)}}},p=class extends y{constructor(){super(),this.listeners={...this.listeners,getIsUserLoggedInCallback:()=>{},getEncryptedDataCallback:()=>{},getPreferredPaymentMethodCallback:()=>{}}}async isUserLoggedIn(){try{return await this.sendMessageAndListenWith({action:"getIsUserLoggedIn"},"getIsUserLoggedInCallback")}catch(e){return!1}}async getEncryptedData(){try{return await this.sendMessageAndListenWith({action:"getEncryptedData"},"getEncryptedDataCallback")}catch(e){return null}}async getPreferredPaymentMethod(){try{return await this.sendMessageAndListenWith({action:"getPreferredPaymentMethod"},"getPreferredPaymentMethodCallback")}catch(e){return null}}callbackFn(e){switch(super.callbackFn(e),e.action){case"get_is_user_logged_in_success":this.listeners.getIsUserLoggedInCallback(e.value);break;case"get_encrypted_data_success":this.listeners.getEncryptedDataCallback(e.value);break;case"get_preferred_payment_method_success":this.listeners.getPreferredPaymentMethodCallback(e.value)}}},m=class extends y{constructor(){super(),this.listeners={...this.listeners,setRedirectSessionDataCallback:()=>{},setTempThirdPartyCookieCallback:()=>{},getIsWooPayReachableCallback:()=>{},getIsThirdPartyCookiesEnabledCallback:()=>{},setPreemptiveSessionDataCallback:()=>{}}}async isWooPayThirdPartyCookiesEnabled(){const{resolvePostMessagePromise:e,removeTemporaryIframe:t}=this.injectTemporaryWooPayConnectIframe(),s=new Promise((e,t)=>{let s=!1;const o=setTimeout(()=>{s=!0,t(new Error("WooPayConnectIframe did not respond within the allotted time."))},l());this.listeners.setTempThirdPartyCookieCallback=t=>{s||(o&&clearTimeout(o),e(t))}});if("function"!=typeof e?.then)return!1;const o=await e;o({action:"setTempThirdPartyCookie"});try{if(!await s)return t(),!1}catch(e){return t(),!1}const a=new Promise((e,t)=>{let s=!1;const o=setTimeout(()=>{s=!0,t(new Error("WooPayConnectIframe did not respond within the allotted time."))},l());this.listeners.getIsThirdPartyCookiesEnabledCallback=t=>{s||(o&&clearTimeout(o),e(t))}});o({action:"getIsThirdPartyCookiesEnabled"});try{return await a}catch(e){return!1}finally{t()}}async sendRedirectSessionDataToWooPay(e){try{return await super.sendMessageAndListenWith({action:"setRedirectSessionData",value:e},"setRedirectSessionDataCallback")}catch(e){return null}}async setPreemptiveSessionData(e){try{return await super.sendMessageAndListenWith({action:"setPreemptiveSessionData",value:e},"setPreemptiveSessionDataCallback")}catch(e){return null}}async isWooPayReachable(){try{return await this.sendMessageAndListenWith({action:"isWooPayReachable"},"getIsWooPayReachableCallback")}catch(e){return!1}}callbackFn(e){switch(super.callbackFn(e),e.action){case"set_redirect_session_data_success":this.listeners.setRedirectSessionDataCallback(e.value);break;case"set_redirect_session_data_error":this.listeners.setRedirectSessionDataCallback({is_error:!0});break;case"set_temp_third_party_cookie_success":this.listeners.setTempThirdPartyCookieCallback(e.value);break;case"get_is_third_party_cookies_enabled_success":this.listeners.getIsThirdPartyCookiesEnabledCallback(e.value);break;case"get_is_woopay_reachable_success":this.listeners.getIsWooPayReachableCallback(e.value);break;case"set_preemptive_session_data_success":this.listeners.setPreemptiveSessionDataCallback(e.value);break;case"set_preemptive_session_data_error":this.listeners.setPreemptiveSessionDataCallback({is_error:!0})}}},w=class{static userConnect;static sessionConnect;static encryptedSessionDataPromise;static redirectElements={CLASSIC_CART_PROCEED_BUTTON:".wc-proceed-to-checkout .checkout-button",BLOCKS_CART_PROCEED_BUTTON:".wp-block-woocommerce-proceed-to-checkout-block",BLOCKS_MINI_CART_PROCEED_BUTTON:"a.wp-block-woocommerce-mini-cart-checkout-button-block",BLOCKS_FOOTER_MINI_CART_PROCEED_BUTTON:"a.wc-block-mini-cart__footer-checkout",CLASSIC_MINI_CART_PROCEED_BUTTON:".widget_shopping_cart a.button.checkout"};static init(){this.getSessionConnect()}static getUserConnect(){return this.userConnect||(this.userConnect=new p),this.userConnect}static getSessionConnect(){return this.sessionConnect||(this.sessionConnect=new m),this.sessionConnect}static teardown(){this.sessionConnect?.detachMessageListener(),this.userConnect?.detachMessageListener(),this.sessionConnect=null,this.userConnect=null}static isWooPayDirectCheckoutEnabled(){return e("isWooPayDirectCheckoutEnabled")}static async isWooPayReachable(){return this.getSessionConnect().isWooPayReachable()}static async isUserLoggedIn(){return this.getUserConnect().isUserLoggedIn()}static async getEncryptedData(){return this.getUserConnect().getEncryptedData()}static async isWooPayThirdPartyCookiesEnabled(){return this.getSessionConnect().isWooPayThirdPartyCookiesEnabled()}static async initPostMessageTimeout(){const e=await this.getSessionConnect().getPostMessageTimeout();var t;e&&(t=e,window.WooPayConnect||(window.WooPayConnect={}),window.WooPayConnect.postMessageTimeout=t)}static async getWooPayCheckoutUrl(){try{let e;if(e=this.isEncryptedSessionDataPrefetched()?await this.encryptedSessionDataPromise:await this.getEncryptedSessionData(),!this.isValidEncryptedSessionData(e))throw new Error("Could not retrieve encrypted session data from store.");const t=await this.getSessionConnect().sendRedirectSessionDataToWooPay(e);if(!t?.redirect_url)throw new Error("Could not retrieve WooPay checkout URL.");const{redirect_url:s}=t;if(!this.validateRedirectUrl(s,"platform_checkout_key"))throw new Error("Invalid WooPay session URL: "+s);return t.redirect_url}catch(e){throw new Error(e.message)}}static isValidEncryptedSessionData(e){return e&&e?.blog_id&&e?.data?.session&&e?.data?.iv&&e?.data?.hash}static async getWooPayMinimumSessionUrl(){const t=await this.getWooPayMinimumSesssionDataFromMerchant();if(!1===t?.success)throw new Error("Could not retrieve redirect data from merchant.");if(!this.isValidEncryptedSessionData(t))throw new Error("Invalid encrypted session data.");const{blog_id:s,data:{session:o,iv:a,hash:n}}=t,i=new URLSearchParams({checkout_redirect:1,blog_id:s,session:o,iv:a,hash:n});return e("woopayHost")+"/woopay/?"+i.toString()}static getCheckoutButtonElements(){const e=[],t=t=>{const s=document.querySelector(t);s&&e.push(s)};return t(this.redirectElements.CLASSIC_CART_PROCEED_BUTTON),t(this.redirectElements.BLOCKS_CART_PROCEED_BUTTON),t(this.redirectElements.CLASSIC_MINI_CART_PROCEED_BUTTON),e}static getClassicProceedToCheckoutButton(){return document.querySelector(this.redirectElements.CLASSIC_CART_PROCEED_BUTTON)}static getMiniCartProceedToCheckoutButton(){return document.querySelector(this.redirectElements.BLOCKS_MINI_CART_PROCEED_BUTTON)}static getFooterMiniCartProceedToCheckoutButton(){return document.querySelector(this.redirectElements.BLOCKS_FOOTER_MINI_CART_PROCEED_BUTTON)}static addRedirectToWooPayEventListener(e,t=!1){e.forEach(e=>{const s={is_loading:!1};e.addEventListener("click",async o=>{if(s.is_loading)return void o.preventDefault();let a;if(s.is_loading=!0,(e=>{if(e.classList.contains("wp-block-woocommerce-mini-cart-checkout-button-block")||e.classList.contains("wc-block-mini-cart__footer-checkout"))return!0;const t=e.classList.contains("checkout-button"),s=e.parentElement?.classList?.contains("wc-proceed-to-checkout");return t&&s})(e)&&(e=>{const t=window.getComputedStyle(e,null).getPropertyValue("color"),s=document.createElement("span");s.classList.add("wc-block-components-spinner"),s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.color=t,s.style.fontSize="unset",s.style.display="inline",s.style.lineHeight="0",s.style.margin="0",s.style.border="0",s.style.padding="0",e.style.color="rgba( 0, 0, 0, 0 )",e.style.position="relative",e.appendChild(s)})(e),a="a"===e.tagName.toLowerCase()?e.href:e.querySelector("a")?.href,a){o.preventDefault();try{let e="";if(t)e=await this.getWooPayCheckoutUrl();else{if(!await this.isWooPayReachable())throw new Error("WooPay is currently not available.");e=await this.getWooPayMinimumSessionUrl()}this.teardown(),window.location.href=e}catch(e){console.warn(e),this.teardown(),window.location.href=a}}else this.teardown()})})}static async getEncryptedSessionData(){const t=await this.getEncryptedData();return n(o(e("wcAjaxUrl"),"get_woopay_session"),{_ajax_nonce:e("woopaySessionNonce"),...t&&{encrypted_data:t}})}static async getWooPayMinimumSesssionDataFromMerchant(){return e("woopayMinimumSessionData")?e("woopayMinimumSessionData"):n(o(e("wcAjaxUrl"),"get_woopay_minimum_session_data"),{_ajax_nonce:e("woopaySessionNonce")})}static validateRedirectUrl(t,s){try{const o=new URL(t);return!(o.origin!==e("woopayHost")||!o.searchParams.has(s))}catch(e){return!1}}static maybePrefetchEncryptedSessionData(){const e=window?.wcpayWooPayDirectCheckout?.params?.is_product_page;void 0===e||e||(this.encryptedSessionDataPromise=new Promise(e=>{e(this.getEncryptedSessionData())}))}static setEncryptedSessionDataAsNotPrefetched(){this.encryptedSessionDataPromise=null}static isEncryptedSessionDataPrefetched(){return"function"==typeof this.encryptedSessionDataPromise?.then}},g=()=>{const e=document.cookie.split(";").find(e=>e.includes("skip_woopay"));if(!e)return!1;const t=e?.split("=");return"skip_woopay"===t[0].trim()&&"1"===t[1].trim()},_=()=>{((t,o={})=>{if(!1===(e("isShopperTrackingEnabled")??s("is_shopper_tracking_enabled")))return;const a=e("platformTrackerNonce")??s("nonce")?.platform_tracker,n=e("ajaxUrl")??s("ajax_url"),i=new FormData;i.append("tracksNonce",a),i.append("action","platform_tracks"),i.append("tracksEventName",t),i.append("tracksEventProp",JSON.stringify(o)),fetch(n,{method:"post",body:i}).then(e=>e.json())})("wcpay_proceed_to_checkout_button_click",{woopay_direct_checkout:Boolean(e("isWooPayDirectCheckoutEnabled"))&&!g()})};window.addEventListener("load",()=>{Object.values(w.redirectElements).forEach(e=>{const t=document.querySelector(e);t&&t.addEventListener("click",_)}),(()=>{const e=document.querySelector(".cart-collaterals");e&&new MutationObserver(()=>{const e=document.querySelector(w.redirectElements.CLASSIC_CART_PROCEED_BUTTON);e&&e.addEventListener("click",_)}).observe(e,{childList:!0,subtree:!0})})()})})()})();
(()=>{var e={6186(e,t,r){"use strict";var n=r(2985);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},2736(e,t,r){e.exports=r(6186)()},2985(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.p=window.wcpayAssets.url,(()=>{"use strict";const e=window.wp.plugins,t=window.React;var n=r(2736);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:b;if(null===e||p(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;throw new Error(r)},y=t.createContext(null);y.displayName="ElementsContext";var w=function(e){var r=e.stripe,n=e.options,o=e.children,a=t.useMemo(function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;if(function(e){return p(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return g(e,t)})};var r=g(e,t);return null===r?{tag:"empty"}:{tag:"sync",stripe:r}}(r)},[r]),i=s(t.useState(function(){return{stripe:"sync"===a.tag?a.stripe:null,elements:"sync"===a.tag?a.stripe.elements(n):null}}),2),c=i[0],l=i[1];t.useEffect(function(){var e=!0,t=function(e){l(function(t){return t.stripe?t:{stripe:e,elements:e.elements(n)}})};return"async"!==a.tag||c.stripe?"sync"!==a.tag||c.stripe||t(a.stripe):a.stripePromise.then(function(r){r&&e&&t(r)}),function(){e=!1}},[a,c,n]);var u=h(r);t.useEffect(function(){null!==u&&u!==r&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[u,r]);var d=h(n);return t.useEffect(function(){if(c.elements){var e=m(n,d,["clientSecret","fonts"]);e&&c.elements.update(e)}},[n,d,c.elements]),t.useEffect(function(){var e;(e=c.stripe)&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"6.3.0"}),e.registerAppInfo({name:"react-stripe-js",version:"6.3.0",url:"https://stripe.com/docs/stripe-js/react"}))},[c.stripe]),t.createElement(y.Provider,{value:c},o)};w.propTypes={stripe:n.any,options:n.object},n.func.isRequired;var k=t.createContext(null);k.displayName="CheckoutContext";var S=function(e){var r=t.useContext(k),n=t.useContext(y);if(r){if(n)throw new Error("You cannot wrap the part of your app that ".concat(e," in both a checkout provider and provider."));return r}return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an provider."));return e}(n,e)},_=["mode"],v=function(e,r,o){var a,i="".concat((a=e).charAt(0).toUpperCase()+a.slice(1),"Element"),c=r?function(e){S("mounts <".concat(i,">"));var r=e.id,n=e.className;return t.createElement("div",{id:r,className:n})}:function(r){var n,o=r.id,a=r.className,c=r.options,l=void 0===c?{}:c,p=r.onBlur,d=r.onFocus,f=r.onReady,b=r.onChange,g=r.onEscape,y=r.onClick,w=r.onLoadError,k=r.onLoaderStart,v=r.onNetworksChange,x=r.onConfirm,C=r.onCancel,T=r.onShippingAddressChange,A=r.onShippingRateChange,M=r.onSavedPaymentMethodRemove,I=r.onSavedPaymentMethodUpdate,E=S("mounts <".concat(i,">")),L="elements"in E?E.elements:null,R="checkoutState"in E?E.checkoutState:null,P="success"===(null==R?void 0:R.type)||"loading"===(null==R?void 0:R.type)?R.sdk:null,O=s(t.useState(null),2),j=O[0],F=O[1],q=t.useRef(null),N=t.useRef(null);u(j,"blur",p),u(j,"focus",d),u(j,"escape",g),u(j,"click",y),u(j,"loaderror",w),u(j,"loaderstart",k),u(j,"networkschange",v),u(j,"confirm",x),u(j,"cancel",C),u(j,"shippingaddresschange",T),u(j,"shippingratechange",A),u(j,"savedpaymentmethodremove",M),u(j,"savedpaymentmethodupdate",I),u(j,"change",b),f&&(n="expressCheckout"===e?f:function(){f(j)}),u(j,"ready",n),t.useLayoutEffect(function(){if(null===q.current&&null!==N.current&&(L||P)){var t=null;if(P){var r=P,n=P;switch(e){case"paymentForm":t=n.createForm(l);break;case"payment":t=r.createPaymentElement(l);break;case"address":if(!("mode"in l))throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");var o=l.mode,a=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(l,_);if("shipping"===o)t=r.createShippingAddressElement(a);else{if("billing"!==o)throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.");t=r.createBillingAddressElement(a)}break;case"expressCheckout":t=r.createExpressCheckoutElement(l);break;case"currencySelector":t=P.createCurrencySelectorElement();break;case"taxId":t=r.createTaxIdElement(l);break;case"contactDetails":t=r.createContactDetailsElement();break;default:throw new Error("<".concat(i,"> is not supported inside a checkout provider. Use an provider instead."))}}else L&&(t=L.create(e,l));q.current=t,F(t),t&&t.mount(N.current)}},[L,P,l]);var H=h(l);return t.useEffect(function(){if(q.current){var e=m(l,H,["paymentRequest"]);e&&"update"in q.current&&q.current.update(e)}},[l,H]),t.useLayoutEffect(function(){return function(){if(q.current&&"function"==typeof q.current.destroy)try{q.current.destroy(),q.current=null}catch(e){}}},[]),t.createElement("div",{id:o,className:a,ref:N})};return c.propTypes={id:n.string,className:n.string,onChange:n.func,onBlur:n.func,onFocus:n.func,onReady:n.func,onEscape:n.func,onClick:n.func,onLoadError:n.func,onLoaderStart:n.func,onNetworksChange:n.func,onConfirm:n.func,onCancel:n.func,onShippingAddressChange:n.func,onShippingRateChange:n.func,onSavedPaymentMethodRemove:n.func,onSavedPaymentMethodUpdate:n.func,options:n.object},c.displayName=i,c.__elementType=e,c},x="undefined"==typeof window;t.createContext(null).displayName="EmbeddedCheckoutProviderContext",v("auBankAccount",x),v("card",x),v("cardNumber",x),v("cardExpiry",x),v("cardCvc",x),v("iban",x),v("payment",x),v("expressCheckout",x),v("paymentRequestButton",x),v("linkAuthentication",x),v("contactDetails",x),v("address",x),v("shippingAddress",x);var C=v("paymentMethodMessaging",x);v("taxId",x),v("issuingCardNumberDisplay",x),v("issuingCardCvcDisplay",x),v("issuingCardExpiryDisplay",x),v("issuingCardPinDisplay",x),v("issuingCardCopyButton",x);const T=window.wp.data,A=window.wc.blocksCheckout;function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}var I=/^\s+/,E=/\s+$/;function L(e,t){if(t=t||{},(e=e||"")instanceof L)return e;if(!(this instanceof L))return new L(e,t);var r=function(e){var t,r,n,o={r:0,g:0,b:0},a=1,i=null,c=null,s=null,l=!1,u=!1;return"string"==typeof e&&(e=function(e){e=e.replace(I,"").replace(E,"").toLowerCase();var t,r=!1;if(Y[e])e=Y[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=ce.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=ce.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=ce.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=ce.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=ce.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=ce.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=ce.hex8.exec(e))?{r:Q(t[1]),g:Q(t[2]),b:Q(t[3]),a:ne(t[4]),format:r?"name":"hex8"}:(t=ce.hex6.exec(e))?{r:Q(t[1]),g:Q(t[2]),b:Q(t[3]),format:r?"name":"hex"}:(t=ce.hex4.exec(e))?{r:Q(t[1]+""+t[1]),g:Q(t[2]+""+t[2]),b:Q(t[3]+""+t[3]),a:ne(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=ce.hex3.exec(e))&&{r:Q(t[1]+""+t[1]),g:Q(t[2]+""+t[2]),b:Q(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==M(e)&&(se(e.r)&&se(e.g)&&se(e.b)?(t=e.r,r=e.g,n=e.b,o={r:255*G(t,255),g:255*G(r,255),b:255*G(n,255)},l=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):se(e.h)&&se(e.s)&&se(e.v)?(i=te(e.s),c=te(e.v),o=function(e,t,r){e=6*G(e,360),t=G(t,100),r=G(r,100);var n=Math.floor(e),o=e-n,a=r*(1-t),i=r*(1-o*t),c=r*(1-(1-o)*t),s=n%6;return{r:255*[r,i,a,a,c,r][s],g:255*[c,r,r,i,a,a][s],b:255*[a,a,c,r,r,i][s]}}(e.h,i,c),l=!0,u="hsv"):se(e.h)&&se(e.s)&&se(e.l)&&(i=te(e.s),s=te(e.l),o=function(e,t,r){var n,o,a;function i(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=G(e,360),t=G(t,100),r=G(r,100),0===t)n=o=a=r;else{var c=r<.5?r*(1+t):r+t-r*t,s=2*r-c;n=i(s,c,e+1/3),o=i(s,c,e),a=i(s,c,e-1/3)}return{r:255*n,g:255*o,b:255*a}}(e.h,i,s),l=!0,u="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=X(a),{ok:l,format:e.format||u,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function R(e,t,r){e=G(e,255),t=G(t,255),r=G(r,255);var n,o,a=Math.max(e,t,r),i=Math.min(e,t,r),c=(a+i)/2;if(a==i)n=o=0;else{var s=a-i;switch(o=c>.5?s/(2-a-i):s/(a+i),a){case e:n=(t-r)/s+(t>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(L(n));return a}function J(e,t){t=t||6;for(var r=L(e).toHsv(),n=r.h,o=r.s,a=r.v,i=[],c=1/t;t--;)i.push(L({h:n,s:o,v:a})),a=(a+c)%1;return i}L.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=X(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=P(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=P(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=R(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=R(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return O(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var a=[ee(Math.round(e).toString(16)),ee(Math.round(t).toString(16)),ee(Math.round(r).toString(16)),ee(re(n))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*G(this._r,255))+"%",g:Math.round(100*G(this._g,255))+"%",b:Math.round(100*G(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*G(this._r,255))+"%, "+Math.round(100*G(this._g,255))+"%, "+Math.round(100*G(this._b,255))+"%)":"rgba("+Math.round(100*G(this._r,255))+"%, "+Math.round(100*G(this._g,255))+"%, "+Math.round(100*G(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(K[O(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+j(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=L(e);r="#"+j(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return L(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(H,arguments)},brighten:function(){return this._applyModification(B,arguments)},darken:function(){return this._applyModification(D,arguments)},desaturate:function(){return this._applyModification(F,arguments)},saturate:function(){return this._applyModification(q,arguments)},greyscale:function(){return this._applyModification(N,arguments)},spin:function(){return this._applyModification(U,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(z,arguments)},complement:function(){return this._applyCombination(V,arguments)},monochromatic:function(){return this._applyCombination(J,arguments)},splitcomplement:function(){return this._applyCombination($,arguments)},triad:function(){return this._applyCombination(W,[3])},tetrad:function(){return this._applyCombination(W,[4])}},L.fromRatio=function(e,t){if("object"==M(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:te(e[n]));e=r}return L(e,t)},L.equals=function(e,t){return!(!e||!t)&&L(e).toRgbString()==L(t).toRgbString()},L.random=function(){return L.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},L.mix=function(e,t,r){r=0===r?0:r||50;var n=L(e).toRgb(),o=L(t).toRgb(),a=r/100;return L({r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a})},L.readability=function(e,t){var r=L(e),n=L(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},L.isReadable=function(e,t,r){var n,o,a,i,c,s=L.readability(e,t);switch(o=!1,(a=r,"AA"!==(i=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(c=(a.size||"small").toLowerCase())&&"large"!==c&&(c="small"),n={level:i,size:c}).level+n.size){case"AAsmall":case"AAAlarge":o=s>=4.5;break;case"AAlarge":o=s>=3;break;case"AAAsmall":o=s>=7}return o},L.mostReadable=function(e,t,r){var n,o,a,i,c=null,s=0;o=(r=r||{}).includeFallbackColors,a=r.level,i=r.size;for(var l=0;ls&&(s=n,c=L(t[l]));return L.isReadable(e,c,{level:a,size:i})||!o?c:(r.includeFallbackColors=!1,L.mostReadable(e,["#fff","#000"],r))};var Y=L.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},K=L.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(Y);function X(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function G(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Z(e){return Math.min(1,Math.max(0,e))}function Q(e){return parseInt(e,16)}function ee(e){return 1==e.length?"0"+e:""+e}function te(e){return e<=1&&(e=100*e+"%"),e}function re(e){return Math.round(255*parseFloat(e)).toString(16)}function ne(e){return Q(e)/255}var oe,ae,ie,ce=(ae="[\\s|\\(]+("+(oe="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?",ie="[\\s|\\(]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")[,|\\s]+("+oe+")\\s*\\)?",{CSS_UNIT:new RegExp(oe),rgb:new RegExp("rgb"+ae),rgba:new RegExp("rgba"+ie),hsl:new RegExp("hsl"+ae),hsla:new RegExp("hsla"+ie),hsv:new RegExp("hsv"+ae),hsva:new RegExp("hsva"+ie),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function se(e){return!!ce.CSS_UNIT.exec(e)}const le=["color","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"],ue=["fontFamily","fontSize","lineHeight","letterSpacing","fontWeight","fontVariation","textDecoration","textShadow","textTransform","-webkit-font-smoothing","-moz-osx-font-smoothing","transition"],he=["backgroundColor","border","borderTop","borderRight","borderBottom","borderLeft","borderRadius","borderWidth","borderColor","borderStyle","borderTopWidth","borderTopColor","borderTopStyle","borderRightWidth","borderRightColor","borderRightStyle","borderBottomWidth","borderBottomColor","borderBottomStyle","borderLeftWidth","borderLeftColor","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","outline","outlineOffset","boxShadow"],pe={".Label":[...le,...ue],".Text":[...le,...ue],".Input":[...le,...ue,...he],".Error":[...le,...ue,...he],".Tab":[...le,...ue,...he],".TabIcon":[...le],".TabLabel":[...le,...ue],".Block":[...le.slice(1),...he.slice(1)],".Container":[...he],".Header":[...le,...he,...ue],".Footer":[...le,...he,...ue]},de={".Label":pe[".Label"],".Label--floating":[...pe[".Label"],"transform"],".Input":[...pe[".Input"],"outlineColor","outlineWidth","outlineStyle"],".Error":pe[".Error"],".Tab":["backgroundColor","color","fontFamily"],".Tab--selected":["outlineColor","outlineWidth","outlineStyle","backgroundColor","color",...he],".TabIcon":pe[".TabIcon"],".TabIcon--selected":["color"],".TabLabel":pe[".TabLabel"],".Block":pe[".Block"],".Container":pe[".Container"],".Header":pe[".Header"],".Footer":pe[".Footer"],".Footer--link":pe[".Text"],".Text":pe[".Text"],".Text--redirect":pe[".Text"]},fe=(e,t=document)=>{let r=null,n=0;for(;!r&&n=.5&&(r=a),n++}return r||"#ffffff"},me=e=>{const t=L(e),r=t.getAlpha();if(r<1){const e=t.toRgb();return L({r:Math.round(e.r*r+255*(1-r)),g:Math.round(e.g*r+255*(1-r)),b:Math.round(e.b*r+255*(1-r))}).getBrightness()>125}return t.getBrightness()>125},be={default:{hiddenContainer:"#wcpay-hidden-div",hiddenInput:"#wcpay-hidden-input",hiddenInvalidInput:"#wcpay-hidden-invalid-input",hiddenValidActiveLabel:"#wcpay-hidden-valid-active-label"},classicCheckout:{appendTarget:".woocommerce-billing-fields__field-wrapper",upeThemeInputSelector:"#billing_first_name",upeThemeLabelSelector:".woocommerce-checkout .form-row label",upeThemeTextSelectors:["#payment .payment_methods li .payment_box fieldset",".woocommerce-checkout .form-row"],rowElement:"p",validClasses:["form-row"],invalidClasses:["form-row","woocommerce-invalid","woocommerce-invalid-required-field"],alternateSelectors:{appendTarget:"form.checkout",upeThemeInputSelector:'form.checkout input[type="text"]',upeThemeLabelSelector:"form.checkout label",upeThemeTextSelectors:["form.checkout",".woocommerce"]},backgroundSelectors:["li.wc_payment_method .wc-payment-form","li.wc_payment_method .payment_box","#payment","#order_review","form.checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:["#place_order"]},blocksCheckout:{appendTarget:".wc-block-checkout__contact-fields",upeThemeInputSelector:".wc-block-components-text-input #email",upeThemeLabelSelector:".wc-block-components-text-input label",upeThemeTextSelectors:[".wc-block-components-checkout-step__description",".wc-block-components-text-input",".wc-block-components-radio-control__label",".wc-block-checkout__terms"],rowElement:"div",validClasses:["wc-block-components-text-input","is-active"],invalidClasses:["wc-block-components-text-input","has-error"],alternateSelectors:{appendTarget:"#billing.wc-block-components-address-form",upeThemeInputSelector:"#billing-first_name",upeThemeLabelSelector:".wc-block-components-checkout-step__description"},backgroundSelectors:["#payment-method .wc-block-components-radio-control-accordion-option","#payment-method","form.wc-block-checkout__form",".wc-block-checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".wc-block-components-checkout-place-order-button"],containerSelectors:[".wp-block-woocommerce-checkout-order-summary-block"]},bnplProductPage:{appendTarget:".product .cart .quantity",upeThemeInputSelector:".product .cart .quantity .qty",upeThemeLabelSelector:".product .cart .quantity label",upeThemeTextSelectors:[".product .cart .quantity"],rowElement:"div",validClasses:["input-text"],invalidClasses:["input-text","has-error"],backgroundSelectors:["#payment-method-message","#main > .product > div.summary.entry-summary","#main > .product","#main","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".single_add_to_cart_button"]},bnplClassicCart:{appendTarget:".cart .quantity",upeThemeInputSelector:".cart .quantity .qty",upeThemeLabelSelector:".cart .quantity label",upeThemeTextSelectors:[".cart .quantity"],rowElement:"div",validClasses:["input-text"],invalidClasses:["input-text","has-error"],backgroundSelectors:["#payment-method-message","#main .entry-content .cart_totals","#main .entry-content","#main","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".checkout-button"],containerSelectors:[".shop_table"]},bnplCartBlock:{appendTarget:".wc-block-cart .wc-block-components-quantity-selector",upeThemeInputSelector:".wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__input",upeThemeLabelSelector:".wc-block-components-text-input",upeThemeTextSelectors:[".wc-block-components-text-input"],rowElement:"div",validClasses:["wc-block-components-text-input"],invalidClasses:["wc-block-components-text-input","has-error"],backgroundSelectors:[".wc-block-components-bnpl-wrapper",".wc-block-components-order-meta",".wc-block-components-totals-wrapper",".wp-block-woocommerce-cart-order-summary-block",".wp-block-woocommerce-cart-totals-block",".wp-block-woocommerce-cart .wc-block-cart",".wp-block-woocommerce-cart","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".wc-block-cart__submit-button"],containerSelectors:[".wp-block-woocommerce-cart-line-items-block"]},wooPayClassicCheckout:{appendTarget:".woocommerce-billing-fields__field-wrapper",upeThemeInputSelector:"#billing_first_name",upeThemeLabelSelector:".woocommerce-checkout .form-row label",upeThemeTextSelectors:[".woocommerce-checkout .form-row"],rowElement:"p",validClasses:["form-row"],invalidClasses:["form-row","woocommerce-invalid","woocommerce-invalid-required-field"],alternateSelectors:{appendTarget:"form.checkout",upeThemeInputSelector:'form.checkout input[type="text"]',upeThemeLabelSelector:"form.checkout label",upeThemeTextSelectors:["form.checkout",".woocommerce"]},backgroundSelectors:["#customer_details","#order_review","form.checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:["#place_order"],linkSelectors:["form.checkout a",".woocommerce a","main a",".entry-content a",".site-content a","#content a","#primary a","a"],containerSelectors:[".woocommerce-checkout-review-order-table"],headerSelectors:["header > div:has(nav)","header > div:has(.site-logo)","header > div:has(.custom-logo)",".site-header","#masthead","header > div:last-of-type","header"],footerSelectors:[".site-footer","#colophon","footer > div","footer"],footerLink:[".site-footer a","footer a"]},wooPayBlocksCheckout:{appendTarget:".wc-block-checkout__contact-fields",upeThemeInputSelector:".wc-block-components-text-input #email",upeThemeLabelSelector:".wc-block-components-text-input label",upeThemeTextSelectors:[".wc-block-components-checkout-step__description",".wc-block-components-text-input",".wc-block-components-radio-control__label",".wc-block-checkout__terms"],rowElement:"div",validClasses:["wc-block-components-text-input","is-active"],invalidClasses:["wc-block-components-text-input","has-error"],alternateSelectors:{appendTarget:"#billing.wc-block-components-address-form",upeThemeInputSelector:"#billing-first_name",upeThemeLabelSelector:".wc-block-components-checkout-step__description"},backgroundSelectors:["#payment-method .wc-block-components-radio-control-accordion-option","#payment-method","form.wc-block-checkout__form",".wc-block-checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".wc-block-components-checkout-place-order-button"],linkSelectors:[".wc-block-checkout a",".wc-block-components-main a","main a",".entry-content a",".site-content a","#content a","#primary a","a"],containerSelectors:[".wp-block-woocommerce-checkout-order-summary-block"],headerSelectors:["header > div:has(nav)","header > div:has(.site-logo)","header > div:has(.custom-logo)",".site-header","#masthead","header > div:last-of-type","header"],footerSelectors:[".site-footer","#colophon","footer > div","footer"],footerLink:[".site-footer a","footer a"]},updateSelectors:function(e,t){return e.hasOwnProperty("alternateSelectors")&&(Object.entries(e.alternateSelectors).forEach(r=>{const[n,o]=r,a=e[n];if(Array.isArray(a))a.some(e=>{try{return t.querySelector(e)}catch(e){return!1}})||(e[n]=o);else try{t.querySelector(e[n])||(e[n]=o)}catch(t){e[n]=o}}),delete e.alternateSelectors),e},getSelectors:function(e,t){let r=this.blocksCheckout;switch(e){case"blocks_checkout":r=this.blocksCheckout;break;case"shortcode_checkout":r=this.classicCheckout;break;case"bnpl_product_page":r=this.bnplProductPage;break;case"bnpl_classic_cart":r=this.bnplClassicCart;break;case"bnpl_cart_block":r=this.bnplCartBlock;break;case"woopay_shortcode_checkout":r=this.wooPayClassicCheckout;break;case"woopay_blocks_checkout":r=this.wooPayBlocksCheckout}return{...this.default,...this.updateSelectors(r,t)}}},ge={getHiddenContainer:function(e,t){const r=t.createElement("div");return r.setAttribute("id",this.getIDFromSelector(e)),r.style.border=0,r.style.clip="rect(0 0 0 0)",r.style.height="1px",r.style.margin="-1px",r.style.overflow="hidden",r.style.padding="0",r.style.position="absolute",r.style.width="1px",r},createRow:function(e,t=[],r){const n=r.createElement(e);return t.length&&n.classList.add(...t),n},appendClone:function(e,t,r,n){const o=n.querySelector(t);if(o){const t=o.cloneNode(!0);t.id=this.getIDFromSelector(r),t.value="",e.appendChild(t)}},getIDFromSelector:function(e){return e.startsWith("#")||e.startsWith(".")?e.slice(1):e},init:function(e,t){const r=be.getSelectors(e,t),n=t.querySelector(r.appendTarget),o=t.querySelector(r.upeThemeInputSelector);if(!n||!o)return;t.querySelector(r.hiddenContainer)&&this.cleanup(t);const a=this.getHiddenContainer(r.hiddenContainer,t);n.appendChild(a);const i=this.createRow(r.rowElement,r.validClasses,t);a.appendChild(i);const c=this.createRow(r.rowElement,r.invalidClasses,t);a.appendChild(c),this.appendClone(i,r.upeThemeInputSelector,r.hiddenInput,t),this.appendClone(i,r.upeThemeLabelSelector,r.hiddenValidActiveLabel,t),this.appendClone(c,r.upeThemeInputSelector,r.hiddenInvalidInput,t),this.appendClone(c,r.upeThemeLabelSelector,r.hiddenInvalidInput,t),t.querySelector(r.hiddenInput).style.transition="none"},cleanup:function(e){const t=e.querySelector(be.default.hiddenContainer);t&&t.remove()}},ye=(e,t,r=null,n)=>{const o=(Array.isArray(e)?e:[e]).map(e=>{try{return n.querySelector(e)}catch(e){return null}}).filter(Boolean);if(!o.length)return{};const a=n.defaultView||window,i=de[t],c=o[0],s=a.getComputedStyle(c),l={};if(i.forEach(e=>{const t=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),r=s.getPropertyValue(t);if(r)if("color"!==e)if("lineHeight"!==e||"0"!==r&&"0px"!==r)l[e]=r;else for(let t=1;t{const t=e.match(/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0?(\.\d+)?|1?(\.0+)?)\s*\)$/);if(t){const r=t[4]||1;e=`rgb(${t.slice(1,4).map(e=>Math.round(e*r+255*(1-r))).join(", ")})`}return e})(r)}),".Input"===t||".Tab--selected"===t){const e=((e,t="solid",r)=>e&&r?[e,t,r].join(" "):"")(l.outlineWidth,l.outlineStyle,l.outlineColor);""!==e&&(l.outline=e),delete l.outlineWidth,delete l.outlineColor,delete l.outlineStyle}const u=s.getPropertyValue("text-indent");return"0px"!==u&&"0px"===l.paddingLeft&&"0px"===l.paddingRight&&(l.paddingLeft=u,l.paddingRight=u),".Block"===t&&(l.backgroundColor=r),l},we={blocks_checkout:"woopay_blocks_checkout",shortcode_checkout:"woopay_shortcode_checkout"},ke=(e,t=!1,r=document)=>{const n=t?we[e]??e:e,o=be.getSelectors(n,r);ge.init(n,r);const a=ye(o.hiddenInput,".Input",null,r),i=ye(o.hiddenInvalidInput,".Input",null,r),c=ye(o.upeThemeLabelSelector,".Label",null,r),s={fontSize:c.fontSize},l=ye(o.upeThemeTextSelectors,".Text",null,r),u=ye(o.upeThemeInputSelector,".Tab",null,r),h=ye(o.hiddenInput,".Tab--selected",null,r),p=(e=>{const t=Object.assign({},e);if(!e.backgroundColor||!e.color)return e;const r=((e,t)=>{const r={backgroundColor:e,color:t},n=L(e),o=L(t);if(!n.isValid()||!o.isValid())return{backgroundColor:"",color:""};const a=n.getBrightness()>50?L(n).darken(7):L(n).lighten(7),i=L.mostReadable(a,[o],{includeFallbackColors:!0});return r.backgroundColor=a.toRgbString(),r.color=i.toRgbString(),r})(e.backgroundColor,e.color);return t.backgroundColor=r.backgroundColor,t.color=r.color,t})(u),d={color:p.color},f={color:h.color},m=fe(o.backgroundSelectors,r),b=ye(o.upeThemeLabelSelector,".Block",m,r),g={colorBackground:m,colorText:l.color,fontFamily:l.fontFamily,fontSizeBase:l.fontSize},y=("blocks_checkout"===e||"woopay_blocks_checkout"===n)&&((e,t=document)=>{let r;try{r=t.querySelector(e)}catch(e){return!0}if(!r)return!0;const n=(t.defaultView||window).getComputedStyle(r).getPropertyValue("position");return!n||"absolute"===n||"fixed"===n})(o.hiddenValidActiveLabel,r);let w={variables:g,theme:me(m)?"stripe":"night",labels:y?"floating":"above",rules:JSON.parse(JSON.stringify({".Input":a,".Input--invalid":i,".Label":c,".Label--resting":s,".Block":b,".Tab":u,".Tab:hover":p,".Tab--selected":h,".TabIcon:hover":d,".TabIcon--selected":f,".Text":l,".Text--redirect":l}))};if(y&&(w=((e,t)=>{if(e.rules[".Label--floating"]=t,e.rules[".Label--floating"].transform&&"none"!==e.rules[".Label--floating"].transform){const t=e.rules[".Label--floating"].transform.match(/matrix\((.+)\)/);if(t&&t[1]){const r=t[1].split(", "),n=(parseFloat(r[0])+parseFloat(r[3]))/2,o=parseFloat(e.rules[".Label--floating"].lineHeight),a=Math.floor(o*n);e.rules[".Label--floating"].lineHeight=`${a}px`,e.rules[".Label--floating"].fontSize=`${a}px`}delete e.rules[".Label--floating"].transform}if(e.rules[".Input"].paddingTop&&(e.rules[".Input"].paddingTop=`calc(${e.rules[".Input"].paddingTop} - ${e.rules[".Label--floating"].lineHeight} - 4px - 1px)`),e.rules[".Input"].paddingBottom){const t=parseFloat(e.rules[".Input"].paddingBottom);e.rules[".Input"].paddingBottom=t-1+"px";const r=e.rules[".Label"].marginTop??"0";e.rules[".Label"].marginTop=`${Math.floor((t-1)/3)}px`,e.rules[".Label--floating"].marginTop=r}return e})(w,ye(o.hiddenValidActiveLabel,".Label--floating",null,r))),t){const e=ye(o.headerSelectors,".Header",null,r),t=ye(o.footerSelectors,".Footer",null,r);(!e.backgroundColor||L(e.backgroundColor).getAlpha()<.5)&&(e.backgroundColor=fe([...o.headerSelectors??[],"body"],r)),(!t.backgroundColor||L(t.backgroundColor).getAlpha()<.5)&&(t.backgroundColor=fe([...o.footerSelectors??[],"body"],r)),w.rules={...w.rules,".Heading":ye(o.headingSelectors,".Label",null,r),".Header":e,".Footer":t,".Footer-link":ye(o.footerLink,".Footer--link",null,r),".Button":ye(o.buttonSelectors,".Input",null,r),".Link":ye(o.linkSelectors,".Label",null,r),".Container":ye(o.containerSelectors,".Container",null,r)}}return ge.cleanup(r),w};function Se(e){return"wcpay_appearance_"+e}const _e=e=>"undefined"!=typeof wcpayConfig&&void 0!==wcpayConfig[e]?wcpayConfig[e]:ve(e),ve=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};function xe(e,t="",r){for(const n in e){const o=e[n],a=t?t+"["+n+"]":n;"string"==typeof o||"number"==typeof o?r.append(a,o):"object"==typeof o&&xe(o,a,r)}return r}const Ce=window.ReactJSXRuntime,Te=new class{constructor(e,t){this.options=e,this.stripe=null,this.stripePlatform=null,this.request=t}createStripe(e,t,r="",n=[]){const o={locale:t};return r&&(o.stripeAccount=r),n&&(o.betas=n),new Stripe(e,o)}async getStripeForUPE(e){return this.options.forceNetworkSavedCards=ve("paymentMethodsConfig")[e].forceNetworkSavedCards,this.getStripe()}async getStripe(e=!1){let t=0;for(;!window.Stripe;)if(await new Promise(e=>setTimeout(e,100)),t+=100,t>6e5)throw new Error("Stripe object not found");return this.__getStripe(e)}__getStripe(e=!1){const{publishableKey:t,accountId:r,forceNetworkSavedCards:n,locale:o,isStripeLinkEnabled:a}=this.options;if(n&&!e)return this.stripePlatform||(this.stripePlatform=this.createStripe(t,o)),this.stripePlatform;if(!this.stripe){let e=["card_country_event_beta_1"];a&&(e=e.concat(["link_autofill_modal_beta_1"])),this.stripe=this.createStripe(t,o,r,e)}return this.stripe}async loadStripeForExpressCheckout(){try{return await this.getStripe(!0)}catch(e){return{error:e}}}confirmIntent(e,t=!1){const r=e.match(/#wcpay-confirm-(pi|si):([^:]+):([^:]+):([^:]+)(?::(.+))?$/);if(!r)return!0;const n="si"===r[1];let o=r[2];const a=r[3],i=r[4],c=r[5]||null,s=e.indexOf("order-pay"),l=s>-1&&e.substring(s).match(/\d+/);return l&&(o=l[0]),(async()=>{const{locale:e,publishableKey:t}=this.options,r=_e("accountIdForIntentConfirmation");if(n){const e=await this.getStripe(!0);return c?e.confirmSetup({clientSecret:a,confirmParams:{confirmation_token:c},redirect:"if_required"}):e.handleNextAction({clientSecret:a})}return r?this.createStripe(t,e,r).confirmCardPayment(a):(await this.getStripe(!0)).handleNextAction({clientSecret:a})})().then(e=>{let r=null;e.paymentIntent?.last_payment_error&&(r={message:e.paymentIntent.last_payment_error.message}),"requires_action"===e.paymentIntent?.status&&(r={message:"Payment requires additional action."});const n=e.paymentIntent&&e.paymentIntent.id||e.setupIntent&&e.setupIntent.id||e.error&&e.error.payment_intent&&e.error.payment_intent.id||e.error.setup_intent&&e.error.setup_intent.id,a=(c="ajax_url",("object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(c)?wcpayExpressCheckoutParams[c]:null)??_e("ajaxUrl"));var c;const s=_e("isChangingPayment");return[this.request(a,{action:"update_order_status",order_id:o,_ajax_nonce:i,intent_id:n,should_save_payment_method:t?"true":"false",is_changing_payment:s?"true":"false"}),r,e.error]}).then(([e,t,r])=>{if(r)throw r;return e.then(e=>{const r="string"==typeof e?JSON.parse(e):e;if(r.error)throw r.error;if(t)throw t;return r.return_url})})}async setupIntent(e,t=""){const r=await this.request(_e("ajaxUrl"),{action:"create_setup_intent","wcpay-payment-method":e,_ajax_nonce:_e("createSetupIntentNonce"),"wcpay-fraud-prevention-token":window.wcpayFraudPreventionToken??"","wcpay-fingerprint":t});if(!r.success)throw r.data.error;if("succeeded"===r.data.status)return r.data;const n=await this.getStripe(),o=await n.confirmCardSetup(r.data.client_secret),{setupIntent:a,error:i}=o;if(i)throw i;return a}expressCheckoutAddToCart(e){const t=_e("wcAjaxUrl"),r=_e("addToCartNonce");return this.request(((e,t,r="wcpay_")=>e.toString().replace("%%endpoint%%",r+t))(t,"add_to_cart"),{security:r,...e})}}({publishableKey:ve("publishableKey"),accountId:ve("accountId"),forceNetworkSavedCards:ve("forceNetworkSavedCards"),locale:ve("locale")},async function(e,t,r){const n=xe(t,"",new FormData),o=await fetch(e,{method:"POST",body:n,...r});return await o.json()}),Ae=({cart:e,context:r})=>{const[n,o]=(0,t.useState)(()=>function(e,t){try{const r=localStorage.getItem(Se(e));if(!r)return null;const n=JSON.parse(r);if(n?.version===t)return n.appearance}catch{}return null}("bnpl_cart_block",ve("stylesCacheVersion"))),[a]=(0,t.useState)(((e=document)=>{const t=[],r=e.styleSheets,n=["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","fonts.bunny.net","fonts.wp.com"];for(let e=0;e{if(!n){const e=ke("bnpl_cart_block");!function(e){document.dispatchEvent(new CustomEvent("wcpay_elements_appearance",{detail:{appearance:e,elementsLocation:"bnpl_cart_block"}}))}(e),function(e,t,r){try{localStorage.setItem(Se("bnpl_cart_block"),JSON.stringify({version:t,appearance:r}))}catch{}}(0,ve("stylesCacheVersion"),e),o(e)}},[n]);const i=function(e,r=!1){const[n,o]=(0,t.useState)(null);return(0,t.useEffect)(()=>{(async()=>{const t=await e.getStripe(r);o(t)})()},[e,r]),n}(Te);if(!i)return null;if(0===Object.keys(n).length)return null;if("woocommerce/cart"!==r)return null;const c=((e,t=2)=>e*Math.pow(10,2-t))(e.cartTotals.total_price,wcSettings.currency.precision);if(!window.wcpayStripeSiteMessaging)return null;const{country:s,paymentMethods:l,currencyCode:u,shouldInitializePMME:h}=window.wcpayStripeSiteMessaging;if(!h)return null;const p={amount:parseInt(c,10)||0,currency:u||"USD",paymentMethodTypes:l||[],countryCode:s};return(0,Ce.jsx)("div",{className:"wc-block-components-bnpl-wrapper",children:(0,Ce.jsx)(w,{stripe:i,options:{appearance:n,fonts:a},children:(0,Ce.jsx)(C,{options:p})})})};(0,e.registerPlugin)("bnpl-site-messaging",{render:()=>(0,T.select)("core/editor")?null:(0,Ce.jsx)(A.ExperimentalOrderMeta,{children:(0,Ce.jsx)(Ae,{})}),scope:"woocommerce-checkout"})})()})();
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s0))return r=s.getHost(e),!0;for(var t=0;t0)for(var i=0;i0)for(var s=0;se.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);;
let cmplz_cookie_data=[],cmplzCleanCookieInterval;function cmplz_log(...e){"undefined"!=typeof complianz&&complianz.debug&&console.warn(...e)}function cmplz_create_element(e,t){e=document.createElement(e);return e.innerHtml=t,e}function cmplz_add_event(e,t,c){document.addEventListener(e,e=>{e.target.closest(t)&&c(e)})}function cmplz_is_hidden(e){return null===e.offsetParent}function cmplz_html_decode(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}function cmplz_sanitize_placeholder_html(e){var t=document.createElement("template");return t.innerHTML=String(e||""),t.content.querySelectorAll("script, iframe, object, embed, link, style, base, meta").forEach(e=>{e.remove()}),t.content.querySelectorAll("*").forEach(n=>{Array.from(n.attributes).forEach(e=>{var t,c=e.name.toLowerCase();0!==c.indexOf("on")&&(t=e.value.trim(),"href"!==c&&"src"!==c&&"xlink:href"!==c||!/^\s*(javascript:|data:)/i.test(t))||n.removeAttribute(e.name)})}),t.innerHTML}function cmplz_is_safe_script_src(e){if("string"!=typeof e)return!1;e=e.trim();if(!e)return!1;try{var t=new URL(e,window.location.href);return"http:"===t.protocol||"https:"===t.protocol}catch(e){return!1}}function cmplz_trap_focus(){var e;cmplz_banner&&(cmplz_original_active_element=cmplz_banner.ownerDocument.activeElement,complianz.soft_cookiewall&&document.body.classList.add("cmplz-banner-active"),document.addEventListener("keydown",cmplz_handle_tab_navigation),0<(e=cmplz_banner.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).length)&&e[0].focus()}function cmplz_handle_tab_navigation(e){var t,c,n,o;"Tab"===e.key&&cmplz_banner&&(0===(c=Array.from(cmplz_banner.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(function(e){return null!==e.offsetParent})).length?e.preventDefault():(t=c[0],c=c[c.length-1],n=cmplz_banner.ownerDocument.activeElement,o=cmplz_banner.contains(n),e.shiftKey?o&&n!==t||(e.preventDefault(),c.focus()):o&&n!==c||(e.preventDefault(),t.focus())))}function cmplz_release_focus_trap(){document.removeEventListener("keydown",cmplz_handle_tab_navigation),document.body.classList.remove("cmplz-banner-active");var e=cmplz_banner_trigger_source;if(cmplz_banner_trigger_source="page-load","manage-consent"===e){if(cmplz_original_active_element&&cmplz_original_active_element.focus)try{cmplz_original_active_element.focus()}catch(e){document.body.focus()}}else cmplz_last_input_was_keyboard&&(document.querySelector('a[href="#content"], a[href="#main"], a[href="#main-content"], .skip-link')||document.body).focus()}function cmplzLoadConsentAreaContent(e,r){document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(t=>{let c=t.getAttribute("data-category"),n=t.getAttribute("data-service");var o=t.getAttribute("data-post_id"),a=t.getAttribute("data-block_id");if(e===c||r===n){let e=new XMLHttpRequest;e.open("GET",complianz.url+"consent-area/"+o+"/"+a,!0),e.setRequestHeader("Content-type","application/json"),e.send(),t.classList.remove("cmplz-placeholder"),e.onload=function(){t.innerHTML=JSON.parse(e.response),t.querySelectorAll("script").forEach(e=>{cmplz_run_script(e.innerHTML,c,n,"inline",e)})}}})}document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(e=>{e.addEventListener("click",e=>{let t=e.target;(t=t.classList.contains("cmplz-consent-area")?t:e.target.closest(".cmplz-consent-area.cmplz-placeholder"))&&(cmplz_set_service_consent(e=t.getAttribute("data-service"),!0),cmplzLoadConsentAreaContent(!1,e),cmplz_enable_category(null,e),cmplz_set_banner_status("dismissed"))}),document.addEventListener("cmplz_enable_category",function(e){cmplzLoadConsentAreaContent(e.detail.category,e.detail.service)})}),document.addEventListener("cmplz_manage_consent_container_loaded",function(){var e,t=window.location.href;-1!==t.indexOf("#")&&(e=-1!==t.lastIndexOf("?")?t.lastIndexOf("?"):void 0,t=t.substring(t.indexOf("#")+1,e),e=document.getElementById(t))&&(t=e.getBoundingClientRect().top+window.pageYOffset-200,window.scrollTo({top:t,behavior:"smooth"}))}),complianz.locale=complianz.locale+"&token="+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),(()=>{function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),c}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)})();let cmplz_banner,cmplz_banner_container=document.getElementById("cmplz-cookiebanner-container"),cmplz_manage_consent_button,cmplz_waiting_inline_scripts=[],cmplz_waiting_scripts=[],cmplz_fired_scripts=[],cmplz_placeholder_class_index=0,cmplz_all_scripts_hook_fired=!1,cmplz_consent_stored_once=!1,cmplz_fired_category_events=["functional"],cmplz_fired_service_events=[],cmplz_categories=["functional","preferences","statistics","marketing"],cmplz_original_active_element=null,cmplz_banner_trigger_source="page-load",cmplz_last_input_was_keyboard=!1,cmplz_set_category_as_body_class=(document.addEventListener("keydown",function(){cmplz_last_input_was_keyboard=!0},!0),document.addEventListener("pointerdown",function(){cmplz_last_input_was_keyboard=!1},!0),window.cmplz_get_cookie=function(t){if("undefined"!=typeof document){t=complianz.prefix+t;var c=document.cookie.split(";");for(let e=0;e{let c=document.body.classList;for(let e=c.length-1;0<=e;e--)c[e].startsWith("cmplz-")&&"cmplz-document"!==c[e]&&c.remove(c[e]);var e=cmplz_accepted_categories(),e=(Object.values(e).forEach(e=>{"string"==typeof e&&c.add("cmplz-"+e)}),cmplz_get_all_service_consents()),e=(Object.entries(e).forEach(([e,t])=>{t&&c.add("cmplz-"+e)}),c.add("cmplz-"+complianz.region,"cmplz-"+complianz.consenttype),new CustomEvent("cmplz_set_category_as_bodyclass"));document.dispatchEvent(e)}),cmplz_append_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(e)),t.appendChild(c)},cmplz_load_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.href=e,t.appendChild(c)};function cmplz_run_script(t,c,n,e,o){var a=document.createElement("script");if("inline"!==e&&cmplz_is_safe_script_src(t)?a.src=t:("string"!=typeof t&&(t=t.innerHTML),a.textContent=[t,"cmplzScriptLoaded();"].join("\n")),!cmplz_in_array(t,cmplz_fired_scripts)){cmplzCopyAttributes(o,a);try{"inline"!==e?a.onload=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)}:window.cmplzScriptLoaded=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)},document.head.appendChild(a)}catch(e){throw cmplz_run_after_all_scripts(c,n),"Something went wrong "+e+" while loading "+t}}}function cmplz_maybe_run_waiting_scripts(e,t,c,n){var o=cmplz_get_waiting_script(cmplz_waiting_scripts,e),o=(o&&cmplz_run_script(o,t,c,"src",n),cmplz_get_waiting_script(cmplz_waiting_inline_scripts,e));o&&cmplz_run_script(o,t,c,"inline",n)}let cmplzLazyLoader=()=>{var e=document.querySelectorAll(".cmplz-blocked-content-container");let t=new IntersectionObserver((e,n)=>{e.forEach(e=>{var t,c;e.isIntersecting&&((t=(e=e.target).getAttribute("data-placeholder-image"))&&(c=e.getAttribute("data-placeholder_class_index"),cmplz_append_css(".cmplz-placeholder-"+c+" {background-image: url("+t+") !important;}"),cmplz_set_blocked_content_container_aspect_ratio(e,t,c)),n.unobserve(e))})});e.forEach(e=>{t.observe(e)})};function cmplz_set_blocked_content_container(){document.querySelectorAll(".cmplz-image").forEach(e=>{var t,c,n,o;e.classList.contains("cmplz-processed")||(e.classList.add("cmplz-processed"),t=e.getAttribute("data-service"),c=e.getAttribute("data-category"),(n=e.parentElement).classList.add("cmplz-blocked-content-container"),o=n.getAttribute("data-placeholder_class_index"),"lazy"===e.getAttribute("loading")&&(e.removeAttribute("loading"),e.setAttribute("data-deferlazy",1)),null===o&&(cmplz_placeholder_class_index++,n.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),n.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(n,c,t)))}),document.querySelectorAll(".cmplz-placeholder-element").forEach(t=>{if(!t.classList.contains("cmplz-processed")){t.classList.add("cmplz-processed");var c=t.getAttribute("data-service"),n=t.getAttribute("data-category");let e;null===(e=t.classList.contains("cmplz-iframe")?("lazy"===t.getAttribute("loading")&&(t.removeAttribute("loading"),t.setAttribute("data-deferlazy",1)),t.parentElement):t).getAttribute("data-placeholder_class_index")&&(cmplz_placeholder_class_index++,e.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),e.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(e,n,c),n=t.getAttribute("data-placeholder-image"))&&void 0!==n&&n.length&&e.setAttribute("data-placeholder-image",n)}}),cmplzLazyLoader(),cmplz_has_consent("statistics")&&cmplz_enable_category("statistics"),cmplz_has_consent("marketing")&&cmplz_enable_category("marketing")}function cmplz_insert_placeholder_text(e,n,o){if(!e.querySelector(".cmplz-blocked-content-notice")){let t=complianz.placeholdertext;n=n||"marketing";let c;if(void 0!==t){if(1===Number(complianz.clean_cookies)){let e=o?o.replace("-"," "):"";e=e.charAt(0).toUpperCase()+e.slice(1),t=t.replace("{service}",e),(c=cmplz_create_element("div",t)).innerHTML=cmplz_sanitize_placeholder_html(t),c.classList.add("cmplz-blocked-content-notice");var a=c.querySelector("button"),a=(a.setAttribute("data-service",o),a.setAttribute("data-category",n),a.setAttribute("aria-label",complianz.aria_label.replace("{service}",e)),complianz.page_links[complianz.region]),r=c.querySelector(".cmplz-links a");a&&a.hasOwnProperty("cookie-statement")?(r.setAttribute("href",a["cookie-statement"].url),"{title}"===r.innerText&&(r.innerText=a["cookie-statement"].title)):r&&(r.parentElement.style.display="none")}else{a=cmplz_create_element("button",""),r=complianz.categories.hasOwnProperty(n)?complianz.categories[n]:"marketing";a.innerText=t.replace("{category}",r),a.classList.add("cmplz-blocked-content-notice","cmplz-accept-category","cmplz-accept-"+n),a.setAttribute("data-service",o),a.setAttribute("data-category",n),a.setAttribute("aria-label",complianz.aria_label.replace("{category}",n)),c=a}("VIDEO"!==e.tagName?e:e.parentElement).appendChild(c)}}}function cmplz_set_blocked_content_container_aspect_ratio(t,c,n){var e;null!=t&&((e=new Image).addEventListener("load",function(){var e=this.naturalWidth||1,e=this.naturalHeight*(t.clientWidth/e),e=-1===c.indexOf("placeholder.jpg")?"height:"+e+"px;":"";cmplz_append_css(".cmplz-placeholder-"+n+" {"+e+"}")}),e.src=c)}let cmplzResizeTimer;function cmplz_enable_category(o,a){1===Number(complianz.tm_categories)&&""!==o&&cmplz_run_tm_event(o);var t={},t=(t.category=o,t.categories=cmplz_accepted_categories(),t.region=complianz.region,new CustomEvent("cmplz_before_category",{detail:t}));if(document.dispatchEvent(t),a=void 0!==a?a:"do_not_match","functional"!==(o=""===o?"do_not_match":o)){"marketing"===o&&cmplz_set_integrations_cookies();let e;e="do_not_match"!==a?'.cmplz-blocked-content-notice [data-service="'+a+'"]':1!==Number(complianz.clean_cookies)?".cmplz-blocked-content-notice.cmplz-accept-"+o:'.cmplz-blocked-content-notice [data-category="'+o+'"]',document.querySelectorAll(e).forEach(e=>{var t=e.getAttribute("data-service");e.parentNode.classList.contains("cmplz-blocked-content-notice")&&(e=e.parentNode),cmplz_is_service_denied(t)||e.parentNode.removeChild(e)}),document.querySelectorAll('[data-category="'+o+'"], [data-service="'+a+'"]').forEach(t=>{var e=t.getAttribute("data-service");if(!cmplz_is_service_denied(e)&&"functional"!==t.getAttribute("data-category")&&!t.classList.contains("cmplz-activated")){var e=t.tagName;if("LINK"===e){t.classList.add("cmplz-activated");var c=t.getAttribute("data-href");cmplz_load_css(c,o)}else if("IMG"===e){t.classList.add("cmplz-activated");c=t.getAttribute("data-src-cmplz");t.setAttribute("src",c),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),cmplz_remove_placeholder(t)}else if("IFRAME"===e){t.classList.add("cmplz-activated");let e=t.getAttribute("data-src-cmplz");c=t.getAttribute("data-cmplz-target")?t.getAttribute("data-cmplz-target"):"src";"1"===cmplz_get_url_parameter(t.getAttribute(c),"autoplay")&&(e+="&autoplay=1"),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),t.addEventListener("load",()=>{cmplz_remove_placeholder(t)}),t.setAttribute(c,e)}else t.classList.contains("cmplz-placeholder-element")&&(t.classList.add("cmplz-activated"),e=t.getAttribute("data-placeholder_class_index"),t.classList.remove("cmplz-blocked-content-container","cmplz-placeholder-"+e))}});t=document.querySelectorAll('script[data-category="'+o+'"], script[data-service="'+a+'"]');t.forEach(e=>{var t=e.getAttribute("data-waitfor"),c=e.getAttribute("data-cmplz-src");t&&(c?cmplz_waiting_scripts[t]=c:0{var t,c,n=e.getAttribute("type");!e.classList.contains("cmplz-activated")&&n&&"text/javascript"!==n&&(e.classList.add("cmplz-activated"),(n=e.getAttribute("data-cmplz-src"))?(e.removeAttribute("type"),cmplz_is_waiting_script(cmplz_waiting_scripts,n)||(e.getAttribute("data-post_scribe_id")?(t="#"+e.getAttribute("data-post_scribe_id"),(c=document.querySelector(t))&&(c.innerHtml(""),postscribe(t,"