// source --> https://www.syrakous.com/wp-content/plugins/paypal-for-woocommerce/assets/js/angelleye-script-loader.min.js 
function finalLoaded(e,t,r){loadedScripts[e].status=t?"loaded":"error";let u=t?loadedScripts[e].queue:loadedScripts[e].error_queue;if(t?loadedScripts[e].error_queue=[]:loadedScripts[e].queue=[],u.length)for(let n=0;n<u.length;n++)"function"==typeof u[n]&&(u[n](),t?delete loadedScripts[e].queue[n]:delete loadedScripts[e].error_queue[n])}function angelleyeLoadPayPalScript(e,t,r){if(void 0!==loadedScripts[e.url]&&"error"!==loadedScripts[e.url].status){"loaded"===loadedScripts[e.url].status?t():(loadedScripts[e.url].queue.push(t),"function"==typeof r&&loadedScripts[e.url].error_queue.push(r));return}loadedScripts[e.url]={status:"pending",queue:[],error_queue:[]},loadedScripts[e.url].queue.push(t),"function"==typeof r&&loadedScripts[e.url].error_queue.push(r);let u=document.createElement("script"),n=e.url;u.addEventListener("load",finalLoaded.bind(null,n,!0)),u.addEventListener("error",finalLoaded.bind(null,n,!1)),u.setAttribute("src",e.url),u.async=!0,e.script_attributes&&Object.entries(e.script_attributes).forEach(e=>{u.setAttribute(e[0],e[1])}),document.body.appendChild(u)}function canShowPlaceOrderBtn(){let e=angelleyeOrder.isOrderCompletePage();return!!(angelleyeOrder.isPpcpPaymentMethodSelected()&&"yes"===angelleye_ppcp_manager.is_checkout_disable_smart_button||angelleyeOrder.isPpcpPaymentMethodSelected()&&"no"===angelleye_ppcp_manager.is_hide_place_order_button)||!(!e&&angelleyeOrder.isAngelleyePaymentMethodSelected()&&!angelleyeOrder.isSavedPaymentMethodSelected())}function showHidePlaceOrderBtn(){canShowPlaceOrderBtn()?jQuery("#place_order").removeClass("hide_place_order_btn").show():jQuery("#place_order").addClass("hide_place_order_btn").hide()}window.loadedScripts=[],jQuery(document).ready(function(){jQuery(document.body).on("change",'input[name="payment_method"]',function(){canShowPlaceOrderBtn()})});
// source --> https://www.syrakous.com/wp-content/plugins/paypal-for-woocommerce/ppcp-gateway/js/wc-gateway-ppcp-angelleye-apple-pay.min.js 
class ApplePayCheckoutButton{static applePayConfig;static isConfigLoading;static configPromise;static applePayObject;constructor(){}async initApplePayConfig(){return ApplePayCheckoutButton.isConfigLoading?(ApplePayCheckoutButton.configPromise||(ApplePayCheckoutButton.configPromise=new Promise((e,a)=>{let t=setInterval(()=>{ApplePayCheckoutButton.applePayConfig&&(e(ApplePayCheckoutButton.applePayConfig),clearInterval(t))},100)})),ApplePayCheckoutButton.configPromise):(ApplePayCheckoutButton.applePayConfig||(ApplePayCheckoutButton.isConfigLoading=!0,ApplePayCheckoutButton.applePayConfig=await ApplePayCheckoutButton.applePay().config()),ApplePayCheckoutButton.applePayConfig)}static applePay(){return ApplePayCheckoutButton.applePayObject||(ApplePayCheckoutButton.applePayObject=angelleye_paypal_sdk.Applepay()),ApplePayCheckoutButton.applePayObject}render(e){"undefined"!=typeof ApplePaySession&&ApplePaySession?.supportsVersion(4)&&ApplePaySession?.canMakePayments()?this.initApplePayConfig().then(()=>{ApplePayCheckoutButton.applePayConfig.isEligible?(this.showApplePayPaymentMethod(),this.renderButton(e)):this.removeApplePayPaymentMethod()}):(console.log("apple pay not supported"),this.removeApplePayPaymentMethod(e))}showApplePayPaymentMethod(){angelleyeOrder.isCheckoutPage()&&jQuery(".wc_payment_method.payment_method_angelleye_ppcp_apple_pay").show()}removeApplePayPaymentMethod(e){angelleyeOrder.isCheckoutPage()&&jQuery(".wc_payment_method.payment_method_angelleye_ppcp_apple_pay").hide(),jQuery(e).length&&jQuery(e).remove()}renderButton(e){this.containerSelector=e,this.initProductCartPage();var a=jQuery(e);a.html(""),console.log("rendering apple_pay button",e,a);let t="black",n="plain",o="";void 0!==angelleye_ppcp_manager.apple_pay_button_props&&(t=angelleye_ppcp_manager.apple_pay_button_props.buttonColor,n=angelleye_ppcp_manager.apple_pay_button_props.buttonType,e=""!==(e=angelleye_ppcp_manager.apple_pay_button_props.height)?"height: "+e+"px;":"",o=e);var e=jQuery('<div class="apple-pay-container" style="'+(""!==o?o:"")+'"></div>'),l=jQuery('<apple-pay-button id="btn-appl" buttonstyle="'+t+'" type="'+n+'" locale="en">');l.on("click",{thisObject:this},this.handleClickEvent),e.append(l),a.append(e)}initProductCartPage(){}static addPaymentMethodSaveParams(){var e=jQuery("input#wc-angelleye_ppcp_apple_pay-new-payment-method:checked").val(),a=angelleyeOrder.getCartDetails();return"true"===e||a.isSubscriptionRequired?{recurringPaymentRequest:{paymentDescription:angelleye_ppcp_manager.apple_pay_recurring_params.paymentDescription,regularBilling:{label:"Recurring",amount:""+a.totalAmount,paymentTiming:"recurring",recurringPaymentStartDate:new Date},billingAgreement:angelleye_ppcp_manager.apple_pay_recurring_params.billingAgreement,managementURL:angelleye_ppcp_manager.apple_pay_recurring_params.managementURL,tokenNotificationURL:ApplePayCheckoutButton.applePayConfig.tokenNotificationURL}}:{}}async handleClickEvent(e){let o=e.data.thisObject.containerSelector;var a=angelleyeOrder.getCartDetails();angelleyeOrder.showProcessingSpinner(),angelleyeOrder.setPaymentMethodSelector("apple_pay");let t=angelleyeJsErrorLogger.generateErrorId();angelleyeJsErrorLogger.addToLog(t,"Apple Pay Payment Started");var n=jQuery("input[name=wc-angelleye_ppcp_apple_pay-payment-token]:checked").val();if(console.log("isSavedPaymentMethodSelected",n),"new"!==n&&void 0!==n)return void await ApplePayCheckoutButton.handleTokenPayment(e,t);a.totalAmount<=0&&angelleyeOrder.showError(localizedMessages.empty_cart_message);let l=[];a.shippingRequired&&(l=["postalAddress","name","email"]);n=ApplePayCheckoutButton.addPaymentMethodSaveParams();let p={countryCode:ApplePayCheckoutButton.applePayConfig.countryCode,currencyCode:a.currencyCode,merchantCapabilities:ApplePayCheckoutButton.applePayConfig.merchantCapabilities,supportedNetworks:ApplePayCheckoutButton.applePayConfig.supportedNetworks,requiredBillingContactFields:["name","phone","email","postalAddress"],requiredShippingContactFields:l,total:{label:localizedMessages.total_amount_placeholder,amount:""+a.totalAmount,type:"final"},lineItems:a.lineItems,...n},r=(console.log("paymentRequest",ApplePayCheckoutButton.applePayConfig,p),null);try{r=new ApplePaySession(4,p)}catch(e){return console.log("ApplePay error session init error: ",e),angelleyeOrder.hideProcessingSpinner(),angelleyeOrder.showError(localizedMessages.apple_pay_pay_error+"<br/>Error:"+e),void angelleyeJsErrorLogger.logJsError(localizedMessages.apple_pay_pay_error+"<br/>Error:"+e,t)}let i=e=>{angelleyeOrder.triggerPaymentCancelEvent(),angelleyeOrder.hideProcessingSpinner(),e&&(e=s(e),angelleyeOrder.showError(e),angelleyeJsErrorLogger.logJsError(e,t),r.completePayment({status:ApplePaySession.STATUS_FAILURE}))},s=e=>{var a;return console.error(e),console.log(JSON.stringify(e)),"PayPalApplePayError"===e.name?(a=e.paypalDebugId,"ERROR_VALIDATING_MERCHANT"!==e.errorName?localizedMessages.general_error_message+" [ApplePay DebugId:"+a+"]":localizedMessages.error_validating_merchant+" [ApplePay DebugId:"+a+"]"):e};r.onvalidatemerchant=e=>{ApplePayCheckoutButton.applePay().validateMerchant({validationUrl:e.validationURL}).then(e=>{r.completeMerchantValidation(e.merchantSession)}).catch(e=>{angelleyeOrder.hideProcessingSpinner();e=s(e);angelleyeOrder.showError(e),angelleyeJsErrorLogger.logJsError(e,t),r.abort()})},r.onpaymentmethodselected=e=>{r.completePaymentMethodSelection({newTotal:p.total})},r.onshippingcontactselected=async e=>{var a=angelleyeOrder.getCartDetails(),a=(console.log("on shipping contact selected",e),{label:localizedMessages.total_amount_placeholder,amount:""+a.totalAmount,type:"final"});try{var t=await angelleyeOrder.shippingAddressUpdate({shippingDetails:e.shippingContact},void 0,void 0,o);if(console.log("shipping update response",t),void 0===t.totalAmount)throw new Error(localizedMessages.shipping_amount_update_error);angelleyeOrder.updateCartTotalsInEnvironment(t),a.amount=t.totalAmount;var n={newTotal:a,newLineItems:t.lineItems,errors:[]};console.log("updating total amount",n),Object.assign(p,{total:a,lineItems:t.lineItems}),r.completeShippingContactSelection(n)}catch(e){i(e)}},r.onshippingmethodselected=async e=>{console.log("on shipping method selected",e);r.completeShippingMethodSelection({})},r.onpaymentauthorized=async e=>{try{console.log("paymentAuthorized",e);var a=await angelleyeOrder.createOrder({angelleye_ppcp_button_selector:o,billingDetails:e.payment.billingContact,shippingDetails:e.payment.shippingContact,errorLogId:t}).then(e=>(console.log("orderCreated",e),e.orderID));await ApplePayCheckoutButton.applePay().confirmOrder({orderId:a,token:e.payment.token,billingContact:e.payment.billingContact,shippingContact:e.payment.shippingContact}),await r.completePayment({status:ApplePaySession.STATUS_SUCCESS}),angelleyeOrder.approveOrder({orderID:a,payerID:""})}catch(e){i(e)}},r.oncancel=e=>{console.log("Apple Pay Cancelled !!",e),i()},r.begin()}static async handleTokenPayment(e,a){e=e.data.thisObject.containerSelector;angelleyeOrder.createOrder({angelleye_ppcp_button_selector:e,callback:()=>{},errorLogId:a}).catch(e=>{angelleyeOrder.handleCreateOrderError(e,a)})}};
// source --> https://www.syrakous.com/wp-content/plugins/paypal-for-woocommerce/ppcp-gateway/js/wc-gateway-ppcp-angelleye-google-pay.min.js 
class GooglePayCheckoutButton{static googlePayConfig;static isConfigLoading;static configPromise;static googlePayObject;static baseRequest={apiVersion:2,apiVersionMinor:0};constructor(){}async initGooglePayConfig(){return GooglePayCheckoutButton.isConfigLoading?(GooglePayCheckoutButton.configPromise||(GooglePayCheckoutButton.configPromise=new Promise((e,o)=>{let t=setInterval(()=>{GooglePayCheckoutButton.googlePayConfig&&(e(GooglePayCheckoutButton.googlePayConfig),clearInterval(t))},100)})),GooglePayCheckoutButton.configPromise):(GooglePayCheckoutButton.googlePayConfig||(GooglePayCheckoutButton.isConfigLoading=!0,GooglePayCheckoutButton.googlePayConfig=await GooglePayCheckoutButton.googlePay().config()),GooglePayCheckoutButton.googlePayConfig)}static googlePay(){return GooglePayCheckoutButton.googlePayObject||(GooglePayCheckoutButton.googlePayObject=angelleye_paypal_sdk.Googlepay()),GooglePayCheckoutButton.googlePayObject}render(t){0!==jQuery(t).length&&this.initGooglePayConfig().then(()=>{var e=this.getGooglePaymentsClient(),o=GooglePayCheckoutButton.googlePayConfig.allowedPaymentMethods;e.isReadyToPay(this.getGoogleIsReadyToPayRequest(o)).then(e=>{e.result&&(this.showGooglePayPaymentMethod(),this.renderButton(t))}).catch(e=>{console.error("errorcatch",e),this.removeGooglePayPaymentMethod(t)})})}getGoogleIsReadyToPayRequest(e){return Object.assign({},GooglePayCheckoutButton.baseRequest,{allowedPaymentMethods:e})}isShippingRequired(){var e=angelleyeOrder.getCartDetails();return!angelleyeOrder.isCheckoutPage()&&e&&void 0!==e.shippingRequired&&e.shippingRequired}getGooglePaymentsClient(e){return new google.payments.api.PaymentsClient({environment:"1"===angelleye_ppcp_manager.sandbox_mode?"TEST":"PRODUCTION",paymentDataCallbacks:{onPaymentDataChanged:this.isShippingRequired()?this.onPaymentDataChanged.bind(null,{thisObject:this}):null,onPaymentAuthorized:this.onPaymentAuthorized.bind(null,{thisObject:this})}})}showGooglePayPaymentMethod(){angelleyeOrder.isCheckoutPage()&&jQuery(".wc_payment_method.payment_method_angelleye_ppcp_google_pay").show()}removeGooglePayPaymentMethod(e){angelleyeOrder.isCheckoutPage()&&jQuery(".wc_payment_method.payment_method_angelleye_ppcp_google_pay").hide(),jQuery(e).length&&jQuery(e).remove()}parseErrorMessage(e){var o;return console.log(e,JSON.stringify(e)),"PayPalGooglePayError"===e.name?(o=e.paypalDebugId,"ERROR_VALIDATING_MERCHANT"!==e.errorName?localizedMessages.general_error_message+" [GooglePay DebugId:"+o+"]":localizedMessages.error_validating_merchant+" [GooglePay DebugId:"+o+"]"):e}onPaymentAuthorized(t,a){return console.log("onPaymentAuthorized",t,a),new Promise((o,e)=>{angelleyeOrder.showProcessingSpinner(),t.thisObject.processPayment(t,a).then(function(e){o({transactionState:"SUCCESS"})}).catch(function(e){e=t.thisObject.parseErrorMessage(e);angelleyeOrder.hideProcessingSpinner(),angelleyeOrder.showError(e),o({transactionState:"ERROR"})})})}onPaymentDataChanged(l,g){return new Promise(async function(e,o){console.log("on shipping changed",g);var t=g.shippingAddress,a={};if("INITIALIZE"==g.callbackTrigger||"SHIPPING_ADDRESS"==g.callbackTrigger)try{var r={administrativeArea:t.administrativeArea,countryCode:t.countryCode,locality:t.locality,postalCode:t.postalCode},n=await angelleyeOrder.shippingAddressUpdate({shippingDetails:r},void 0,void 0,l.thisObject.containerSelector);if(void 0===n.totalAmount)throw new Error(localizedMessages.shipping_amount_update_error);angelleyeOrder.updateCartTotalsInEnvironment(n),a.newTransactionInfo=l.thisObject.getGoogleTransactionInfo()}catch(e){console.log("shipping change error"),angelleyeOrder.handleCreateOrderError(l.thisObject.parseErrorMessage(e),l.thisObject.errorLogId),a.error=localizedMessages.shipping_amount_pull_error,o(localizedMessages.shipping_amount_pull_error)}e(a)})}async processPayment(o,t){try{console.log("processPayment",o,JSON.stringify(t));var e=o.thisObject,a=(angelleyeOrder.showProcessingSpinner(),await angelleyeOrder.createOrder({angelleye_ppcp_button_selector:e.containerSelector,errorLogId:o.thisObject.errorLogId}).then(e=>(console.log("orderCreated",e),angelleyeOrder.updateCartTotalsInEnvironment(e),e.orderID))),r=(await GooglePayCheckoutButton.googlePay().confirmOrder({orderId:a,paymentMethodData:t.paymentMethodData})).status;if("APPROVED"!==r)return{transactionState:"ERROR"};if(!angelleyeOrder.isCheckoutPage()){let e;var n=t.shippingAddress;t.paymentMethodData&&t.paymentMethodData.info&&t.paymentMethodData.info.billingAddress&&(e=t.paymentMethodData.info.billingAddress),t.email&&((e=e||{}).emailAddress=t.email),await angelleyeOrder.shippingAddressUpdate({shippingDetails:n},{billingDetails:e},o.thisObject.errorLogId)}return angelleyeOrder.approveOrder({orderID:a,payerID:""}),{transactionState:"SUCCESS"}}catch(e){return console.log("processPaymentError",e),angelleyeOrder.handleCreateOrderError(o.thisObject.parseErrorMessage(e),o.thisObject.errorLogId),{transactionState:"ERROR",error:{message:e.message}}}}renderButton(e){this.containerSelector=e;e=jQuery(e);e.html("");let o="default",t="plain",a="";void 0!==angelleye_ppcp_manager.google_pay_button_props&&(o=angelleye_ppcp_manager.google_pay_button_props.buttonColor,t=angelleye_ppcp_manager.google_pay_button_props.buttonType,r=""!==(r=angelleye_ppcp_manager.google_pay_button_props.height)?"height: "+r+"px;":"",a=r);var r=jQuery('<div class="google-pay-container" style="'+(""!=a?a:"")+'"></div>');let n=this;var l=this.getGooglePaymentsClient().createButton({buttonColor:o,buttonType:t,buttonSizeMode:"fill",onClick:async e=>{await n.handleClickEvent(e,n)}});r.append(l),e.append(r)}getGoogleTransactionInfo(){var t=[],a=angelleyeOrder.getCartDetails();for(let o=0;o<a.lineItems.length;o++){let e="LINE_ITEM";"tax"===a.lineItems[o].label.toLowerCase()&&(e="TAX"),t.push({label:a.lineItems[o].label,price:a.lineItems[o].amount,type:e})}return{displayItems:t,currencyCode:a.currencyCode,totalPriceStatus:"FINAL",totalPrice:a.totalAmount,totalPriceLabel:"Total"}}getGooglePaymentDataRequest(){var e=Object.assign({},GooglePayCheckoutButton.baseRequest);return e.allowedPaymentMethods=GooglePayCheckoutButton.googlePayConfig.allowedPaymentMethods,e.transactionInfo=this.getGoogleTransactionInfo(),e.merchantInfo=GooglePayCheckoutButton.googlePayConfig.merchantInfo,e.emailRequired=!0,e.callbackIntents=["PAYMENT_AUTHORIZATION"],this.isShippingRequired()&&(e.callbackIntents.push("SHIPPING_ADDRESS"),e.shippingAddressRequired=!0),e}async handleClickEvent(e,o){console.log("click event",e,o.containerSelector),o.errorLogId=angelleyeJsErrorLogger.generateErrorId();angelleyeOrder.getCartDetails().totalAmount<=0&&angelleyeOrder.showError(localizedMessages.empty_cart_message),angelleyeJsErrorLogger.addToLog(o.errorLogId,"Google Pay Payment Started"),angelleyeOrder.setPaymentMethodSelector("google_pay");e=o.getGooglePaymentDataRequest();o.getGooglePaymentsClient({}).loadPaymentData(e).then(e=>{console.log("success",e)},e=>{angelleyeOrder.triggerPaymentCancelEvent(),angelleyeOrder.hideProcessingSpinner(o.containerSelector),angelleyeOrder.hideProcessingSpinner(),console.log("error handler click",e)})}};