1"use strict";(globalThis.webpackChunkNorden_Commerce=globalThis.webpackChunkNorden_Commerce||[]).push([[8903],{3830(e,t,r){function n(e){var t=Object.prototype.hasOwnProperty.call(e,"sdkBaseUrl")?e.sdkBaseUrl:void 0,r=e.environment;e.sdkBaseUrl;var n=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["environment","sdkBaseUrl"]),a=t||function(e){return"sandbox"===e?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}(r),i=n,c=Object.keys(i).filter(function(e){return void 0!==i[e]&&null!==i[e]&&""!==i[e]}).reduce(function(e,t){var r,n=i[t].toString();return r=function(e,t){return(t?"-":"")+e.toLowerCase()},"data"===(t=t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,r)).substring(0,4)||"crossorigin"===t?e.attributes[t]=n:e.queryParams[t]=n,e},{queryParams:{},attributes:{}}),l=c.queryParams,u=c.attributes;return l["merchant-id"]&&-1!==l["merchant-id"].indexOf(",")&&(u["data-merchant-id"]=l["merchant-id"],l["merchant-id"]="*"),{url:"".concat(a,"?").concat(o(l)),attributes:u}}function o(e){var t="";return Object.keys(e).forEach(function(r){0!==t.length&&(t+="&"),t+=r+"="+e[r]}),t}function a(e,t){void 0===t&&(t={});var r=document.createElement("script");return r.src=e,Object.keys(t).forEach(function(e){r.setAttribute(e,t[e]),"data-csp-nonce"===e&&r.setAttribute("nonce",t["data-csp-nonce"])}),r}function i(e,t){if(void 0===t&&(t=Promise),l(e,t),"undefined"==typeof document)return t.resolve(null);var r=n(e),o=r.url,i=r.attributes,u=i["data-namespace"]||"paypal",d=c(u);return i["data-js-sdk-library"]||(i["data-js-sdk-library"]="paypal-js"),function(e,t){var r=document.querySelector('script[src="'.concat(e,'"]'));if(null===r)return null;var n=a(e,t),o=r.cloneNode();if(delete o.dataset.uidAuto,Object.keys(o.dataset).length!==Object.keys(n.dataset).length)return null;var i=!0;return Object.keys(o.dataset).forEach(function(e){o.dataset[e]!==n.dataset[e]&&(i=!1)}),i?r:null}(o,i)&&d?t.resolve(d):function(e,t){void 0===t&&(t=Promise);l(e,t);var r=e.url,n=e.attributes;if("string"!=typeof r||0===r.length)throw new Error("Invalid url.");if(void 0!==n&&"object"!=typeof n)throw new Error("Expected attributes to be an object.");return new t(function(e,t){if("undefined"==typeof document)return e();!function(e){var t=e.url,r=e.attributes,n=e.onSuccess,o=e.onError,i=a(t,r);i.onerror=o,i.onload=n,document.head.insertBefore(i,document.head.firstElementChild)}({url:r,attributes:n,onSuccess:function(){return e()},onError:function(){var e=new Error('The script "'.concat(r,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return t(e)}})})}({url:o,attributes:i},t).then(function(){var e=c(u);if(e)return e;throw new Error("The window.".concat(u," global variable is not available."))})}function c(e){return window[e]}function l(e,t){if("object"!=typeof e||null===e)throw new Error("Expected an options object.");var r=e.environment;if(r&&"production"!==r&&"sandbox"!==r)throw new Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==t&&"function"!=typeof t)throw new Error("Expected PromisePonyfill to be a function.")}r.d(t,{k0:()=>i}),"function"==typeof SuppressedError&&SuppressedError},8723(e,t,r){r.d(t,{loadPaypalPaymentOptions:()=>a,paypalButton:()=>i});var n=r(3830),o=r(4561);const a=()=>{document.getElementById("paypal-button-enabler").innerText=gettext("Loading PayPal payment options..."),document.getElementById("paypal-button-enabler").disabled=!0,(0,n.k0)(JSON.parse(document.getElementById("paypal-sdk-params").textContent)).then(e=>{e.Buttons({style:{layout:"vertical",color:"gold",shape:"pill",label:"buynow",tagline:!1,height:50},createOrder:function(e,t){return(0,o.Fp)(paypalCheckoutCreateUrl,{method:"POST"}).then(e=>{if(!e.redirect)return e.orderID;window.location.href=e.redirect})},onApprove:function(e,t){return(0,o.Fp)(paypalCheckoutCaptureUrl,{method:"POST",data:{orderId:e.orderID}}).then(e=>{e.redirect&&(window.location.href=e.redirect)})},onError:function(e){return(0,o.Fp)(paypalCheckoutErrorRedirectUrl,{method:"POST",data:{errorMessage:e.message,errorStack:e.stack}}).then(e=>{window.location.href=paypalCheckoutErrorRedirectUrl})},onCancel:function(e){},onInit:function(e,t){document.getElementById("paypal-button-enabler").remove();let r=document.querySelector('[data-accordion-content="PAYPAL_CHECKOUT"]');r&&(r.style.height=r.scrollHeight+"px")},onClick:function(e){"card"===e.fundingSource&&window.setTimeout(()=>{let e=document.querySelector('[data-accordion-content="PAYPAL_CHECKOUT"]');e&&(e.style.height=e.scrollHeight+"px")},2e3)}}).render("#paypal-button-container")}).catch(e=>{(0,o.Fp)(paypalCheckoutErrorRedirectUrl,{method:"post",data:{error:JSON.stringify(e)}}).then(e=>{window.location.href=paypalCheckoutErrorRedirectUrl})})},i=()=>{document.getElementById("paypal-button-enabler").addEventListener("click",a)}},6534(e,t,r){r.d(t,{paypalButton:()=>a});var n=r(3830),o=r(4561);const a=()=>{document.getElementById("paypal-subscription-button-enabler").addEventListener("click",()=>{document.getElementById("paypal-subscription-button-enabler").innerText=gettext("Loading PayPal payment options..."),document.getElementById("paypal-subscription-button-enabler").disabled=!0,(0,n.k0)(JSON.parse(document.getElementById("paypal-sdk-params").textContent)).then(e=>{e.Buttons({style:{layout:"vertical",color:"gold",shape:"pill",label:"buynow",tagline:!1,height:50},createSubscription:function(e,t){return(0,o.Fp)(paypalSubscriptionCreateUrl,{method:"POST"}).then(e=>{if(e.redirect)window.location.href=e.redirect;else if(e.subscription_id)return e.subscription_id})},onApprove:function(e,t){return(0,o.Fp)(paypalSubscriptionCaptureUrl,{method:"POST",data:{subscriptionId:e.subscriptionID}}).then(e=>{e.redirect&&(window.location.href=e.redirect)})},onError:function(e){return(0,o.Fp)(paypalSubscriptionErrorRedirectUrl,{method:"POST",data:{errorMessage:e.message,errorStack:e.stack}}).then(e=>{window.location.href=paypalSubscriptionErrorRedirectUrl})},onCancel:function(e){},onInit:function(e,t){document.getElementById("paypal-subscription-button-enabler").remove();let r=document.querySelector('[data-accordion-content="PAYPAL_CHECKOUT"]');r.style.height=r.scrollHeight+"px"},onClick:function(e){"card"===e.fundingSource&&window.setTimeout(()=>{let e=document.querySelector('[data-accordion-content="PAYPAL_CHECKOUT"]');e.style.height=e.scrollHeight+"px"},2e3)}}).render("#paypal-subscription-button-container")}).catch(e=>{(0,o.Fp)(paypalCheckoutErrorRedirectUrl,{method:"post",data:{error:JSON.stringify(e)}}).then(e=>{window.location.href=paypalCheckoutErrorRedirectUrl})})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.