useApplePayCheckoutFlow",["errorCode","FBLogger","FBPayECPAPMLoggerContext","FBPayECPApplePayUtils","FBPayECPConstantsUtils","FBPayJsUtils","PaymentCredentialTypeEnum","Promise","asyncToGeneratorRuntime","err","graphQLEnumAdapter","react","useAPMCompleteCredentialAcquisitionMutation","useAPMUpdateOrderMutation","useApplePayBrowserAvailability","useECPCometFinalizeCheckoutMutation","useFBPayFetchApplePayMerchantSessionQuery"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c=u||(u=o("react")),d=c.useCallback,m=c.useContext,p=c.useRef;function _(t){var a=t.isShippingEnabled,i=t.onCancel,l=t.onClick,s=t.onOrderFailure,u=t.onOrderSuccess,c=t.onPaymentAuthorized,_=t.onPaymentInfoChange,f=t.orderId,g=t.paymentAccountId,h=t.paymentProductId,y=t.paymentRequestInput,C=t.receiverId,b=t.sessionId,v=r("useApplePayBrowserAvailability")(),S=d(function(){var e,t,n;return{lineItems:[].concat((e=y.lineItems)!=null?e:[]),shippingAddress:null,shippingMethod:(t=(n=y.shippingMethods)==null?void 0:n[0])!=null?t:null,total:y.total}},[y]),R=S(),L=p(R.lineItems),E=p(R.shippingAddress),k=p(R.shippingMethod),I=p(R.total),T=r("useFBPayFetchApplePayMerchantSessionQuery")(),D=T[0],x=r("useAPMUpdateOrderMutation")(),$=x[0],P=r("useAPMCompleteCredentialAcquisitionMutation")(),N=P[0],M=r("useECPCometFinalizeCheckoutMutation")(),w=r("graphQLEnumAdapter")(r("PaymentCredentialTypeEnum")).valueToName.apple_pay,A=m(r("FBPayECPAPMLoggerContext")),F=A.apmLogger,O=d(function(){F.logUserClickAPMButtonAtomic("apple_pay",o("FBPayECPConstantsUtils").APPLE_PAY_BUTTON_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_BUTTON_VIEW_NAME,h),l&&l();var t=function(a,i){return new(e||(e=n("Promise")))(function(e,t){var n=parseInt(g,10);D({domain_name:i,merchant_validation_url:a,order_id:f,payment_account_id:Number.isNaN(n)?void 0:n,product_id:h,session_id:b},function(n){var r=o("FBPayECPApplePayUtils").getMerchantSession(n);r!=null?e(r):t()},function(e){r("FBLogger")("useApplePayCheckoutFlow").mustfix("Failed to fetch Apple Pay merchant session: %s",e.message),t(e)})})},d=function(){var t=E.current?o("FBPayECPApplePayUtils").getShippingAddressInputFromApplePayPaymentContact(E.current):null,a=k.current?o("FBPayECPApplePayUtils").getECPShippingOptionFromApplePayShippingMethod(k.current,y.currencyCode):null;return new(e||(e=n("Promise")))(function(e,n){$({onCompleted:function(a){var t=a==null?void 0:a.apm_update_order_mutation,i=t==null?void 0:t.price_items,l=t==null?void 0:t.total_price,s=t==null?void 0:t.error;if((s==null?void 0:s.user_facing_error)!=null){var u,c,d=s==null?void 0:s.user_facing_error;if(d.error_code===3048038){n(o("FBPayECPApplePayUtils").createApplePayError(o("FBPayECPApplePayUtils").ApplePayErrorCode.ADDRESS_UNSERVICEABLE));return}var m=(u=(c=d.error_description)!=null?c:d.error_title)!=null?u:"Order update failed";n(r("err")(m));return}var p=L.current;i&&(p=o("FBPayECPApplePayUtils").getApplePayLineItemsFromECPPriceItems(i),L.current=p);var _=I.current;l&&(_=o("FBPayECPApplePayUtils").getApplePayLineItemsFromECPPriceItems([l])[0],I.current=_),e({newLineItems:p,newTotal:_})},onError:function(t){n(t)},variables:{input:{credential_type:w,order_id:f,payment_account_id:g,product_id:h,selected_shipping_address:t!=null?t:void 0,selected_shipping_option:a!=null?a:void 0,session_id:b}}})})},m=babelHelpers.extends({},y,{supportedNetworks:o("FBPayECPApplePayUtils").getSupportedApplePayNetworks(y.supportedNetworks)});a||(m.shippingMethods=[],m.requiredShippingContactFields=[]);var p=window,v=p.ApplePaySession,R=new v(3,m);R.onvalidatemerchant=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){F.logClientVerifyApplepayInit(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_MERCHANT_VALIDATION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{var n=o("FBPayECPApplePayUtils").getApplePayDomainName(),r=o("FBPayECPApplePayUtils").getMerchantValidationUrl(e.validationURL,n),a=yield t(r,n);R.completeMerchantValidation(a),F.logClientVerifyApplepaySuccess(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_MERCHANT_VALIDATION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(e){F.logClientVerifyApplepayFail(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_MERCHANT_VALIDATION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:o("FBPayECPApplePayUtils").getApplePayErrorMessageForLogging(e)}),R.abort()}});return function(t){return e.apply(this,arguments)}})(),R.onpaymentmethodselected=function(){F.logClientSelectApplepayInit(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_PAYMENT_METHOD_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{var e={newLineItems:L.current,newTotal:I.current};R.completePaymentMethodSelection(e),_&&_({infoType:o("FBPayECPApplePayUtils").ApplePayPaymentInfo.PAYMENT_METHOD}),F.logClientSelectApplepaySuccess(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_PAYMENT_METHOD_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(e){F.logClientSelectApplepayFail(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_PAYMENT_METHOD_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:o("FBPayECPApplePayUtils").getApplePayErrorMessageForLogging(e,"Unknown error on select payment method")}),R.abort()}},R.onshippingmethodselected=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){var t=e.shippingMethod;F.logClientSelectApplepayInit(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_METHOD_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{k.current=t;var n=yield d();R.completeShippingMethodSelection(n),_&&_({infoType:o("FBPayECPApplePayUtils").ApplePayPaymentInfo.SHIPPING_METHOD}),F.logClientSelectApplepaySuccess(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_METHOD_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(e){F.logClientSelectApplepayFail(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_METHOD_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:o("FBPayECPApplePayUtils").getApplePayErrorMessageForLogging(e,"Unknown error on select shipping method")}),R.abort()}});return function(t){return e.apply(this,arguments)}})(),R.onshippingcontactselected=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){var t=e.shippingContact;F.logClientSelectApplepayInit(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{var n=o("FBPayECPApplePayUtils").validatePartialShippingContact(t);if(n!==null){F.logClientSelectApplepayFail(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:"Invalid shipping contact"}),R.completeShippingContactSelection({errors:[n],newLineItems:L.current,newShippingMethods:[],newTotal:I.current});return}E.current=t;var r=yield d();R.completeShippingContactSelection({newLineItems:r.newLineItems,newShippingMethods:[],newTotal:r.newTotal,status:v.STATUS_SUCCESS}),_&&_({infoType:o("FBPayECPApplePayUtils").ApplePayPaymentInfo.SHIPPING_CONTACT}),F.logClientSelectApplepaySuccess(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(e){F.logClientSelectApplepayFail(h,f,o("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:o("FBPayECPApplePayUtils").getApplePayErrorMessageForLogging(e,"Unknown error on select shipping contact")});var a=null;o("FBPayECPApplePayUtils").isApplePayError(e)?a=e:a=o("FBPayECPApplePayUtils").createApplePayError(o("FBPayECPApplePayUtils").ApplePayErrorCode.SHIPPING_CONTACT_INVALID,o("FBPayECPApplePayUtils").ApplePayErrorContactField.COUNTRY,e instanceof Error?e.message:"Unable to process shipping address"),R.completeShippingContactSelection({errors:[a],newLineItems:L.current,newShippingMethods:[],newTotal:I.current})}});return function(t){return e.apply(this,arguments)}})(),R.onpaymentauthorized=(function(){var t=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t){F.logClientExecuteApplepayInit(h,f,void 0,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{var a=t.payment,i=c&&(yield c(a.billingContact,a.shippingContact));if((i==null?void 0:i.error)!=null){F.logClientExecuteApplepayFail(h,f,void 0,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:i.error instanceof Error?i.error.message:"Unknown error on pre-payment validation"}),R.abort(),s&&s({error:i.error});return}var l=a.token,d=yield new(e||(e=n("Promise")))(function(e,t){N({onCompleted:function(o){var n,a,i,l=o==null||(n=o.complete_credential_acquisition)==null||(n=n.response)==null?void 0:n.credential_id,s=o==null||(a=o.complete_credential_acquisition)==null||(a=a.response)==null?void 0:a.shipping_address_id,u=o==null||(i=o.complete_credential_acquisition)==null?void 0:i.error;if(u!=null||l==null){var c,d,m=(c=(d=u==null?void 0:u.error_description)!=null?d:u==null?void 0:u.error_title)!=null?c:"Credential acquisition failed";t(r("err")(m));return}e({credentialId:l,shippingAddressId:s})},onError:function(n){t(n)},variables:{input:{complete_credential_acquisition_request:{checkout_session_id:b,merchant_routing_country:y.countryCode,payment_account_id:g,payment_product_id:h,processor_data:{external_billing_address:a.billingContact?o("FBPayECPApplePayUtils").getBillingAddressInputFromApplePayPaymentContact(a.billingContact):null,external_card_info:l.paymentMethod?o("FBPayECPApplePayUtils").getExternalCardInfoFromApplePayPaymentMethod(l.paymentMethod):null,external_shipping_address:a.shippingContact?o("FBPayECPApplePayUtils").getShippingAddressInputFromApplePayPaymentContact(a.shippingContact):null,processor_token:JSON.stringify(l.paymentData)},receiver_info:{receiver_id:C}},credential_type:w,session_id:b}}})});F.logClientSubmitEcppaymentInit(h,d.credentialId,"apple_pay",o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);var m=a.shippingContact?o("FBPayECPApplePayUtils").getShippingAddressInputFromApplePayPaymentContact(a.shippingContact):null,p=yield new e(function(e,t){var n,i,l;M({auth_factors:{platform_trust_token:""},checkout_info_fields:{payer_email:(n=a.shippingContact)==null?void 0:n.emailAddress,payer_name:m==null?void 0:m.care_of,payer_phone:(i=a.shippingContact)==null?void 0:i.phoneNumber,selected_shipping_option:k.current?o("FBPayECPApplePayUtils").getECPShippingOptionFromApplePayShippingMethod(k.current,y.currencyCode):null,shipping_address_details:{address:m,address_id:(l=d.shippingAddressId)!=null?l:""}},country_code:y.countryCode,credentials:[{charge_amount:{amount:I.current.amount,currency_code:y.currencyCode},credential_id:d.credentialId,credential_type:w}],ecp_order_id:f,one_time_checkout_input:{otc_session_id:b,otc_type:"APPLE_PAY"},pay_button_click_id:o("FBPayJsUtils").uuidv4(),payment_product_id:h,payment_request_id:o("FBPayJsUtils").uuidv4(),receiver_info:[{charge_amount:{amount:I.current.amount,currency_code:y.currencyCode},receiver_id:C}],upl_session_id:b},function(n){var o,a,i=n==null||(o=n.ecp_finalize_checkout)==null?void 0:o.error,l=n==null||(a=n.ecp_finalize_checkout)==null?void 0:a.checkout_status;if(i!=null){var s,u,c=(s=(u=i==null?void 0:i.error_description)!=null?u:i==null?void 0:i.error_title)!=null?s:"Payment authorization failed";t(r("err")(c));return}e({checkoutStatus:l})},function(e){var n,o,a=String((n=(o=e==null?void 0:e.error_description)!=null?o:e==null?void 0:e.error_title)!=null?n:"Payment authorization failed");t(r("err")(a))},o("FBPayECPConstantsUtils").APM_CREDENTIAL_VIEW_NAME,void 0,d.credentialId,"apple_pay")});R.completePayment(v.STATUS_SUCCESS),F.logClientProcessEcppaymentperceivedSuccess(h,!0),F.logClientSubmitEcppaymentSuccess(h,d.credentialId,"apple_pay",o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME),u&&u({checkoutStatus:p.checkoutStatus}),F.logClientExecuteApplepaySuccess(h,f,void 0,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(e){F.logClientExecuteApplepayFail(h,f,void 0,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:o("FBPayECPApplePayUtils").getApplePayErrorMessageForLogging(e)}),F.logClientSubmitEcppaymentFail(h,"apple_pay",o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,o("FBPayECPApplePayUtils").getApplePayErrorMessageForLogging(e));var _=o("FBPayECPApplePayUtils").isApplePayError(e)?[e]:[o("FBPayECPApplePayUtils").createApplePayError(o("FBPayECPApplePayUtils").ApplePayErrorCode.UNKNOWN,void 0,e instanceof Error?e.message:"Payment authorization failed")];R.completePayment({errors:_,status:v.STATUS_FAILURE}),s&&s({error:e})}});return function(e){return t.apply(this,arguments)}})(),R.oncancel=function(){var e=S();E.current=e.shippingAddress,k.current=e.shippingMethod,L.current=e.lineItems,I.current=e.total,F.logClientCancelApplepaySuccess(h,f,void 0,o("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME),i&&i()},R.begin()},[F,h,l,y,a,D,f,b,$,w,g,_,c,u,s,N,C,M,S,i]);return{isApplePayAvailable:v,triggerApplePayFlow:O}}l.default=_}),98);
-----
useAPMUpdateOrderMutation.frl.graphql",[],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],b=[{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,concreteType:"CurrencyAmount",kind:"LinkedField",name:"amount",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"amount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"currency",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}];b=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"APMUpdateOrderPayload",kind:"LinkedField",name:"apm_update_order_mutation",plural:!1,selections:[{alias:null,args:null,concreteType:"ECPPriceInfo",kind:"LinkedField",name:"price_items",plural:!0,selections:b,storageKey:null},{alias:null,args:null,concreteType:"ECPPriceInfo",kind:"LinkedField",name:"total_price",plural:!1,selections:b,storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"useAPMUpdateOrderMutation",selections:b,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"useAPMUpdateOrderMutation",selections:b},params:{id:"24733815846313004",metadata:{},name:"useAPMUpdateOrderMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
FBPayAPMApplePayButton.react",["fbt","ix","CometImage.react","CometPressable.react","FBLogger","FBPayECPAPMLoggerContext","FBPayECPApplePayUtils","FBPayECPConstantsUtils","FBPayECPText.react","FBPayJsUtils","PaymentCredentialTypeEnum","Promise","asyncToGeneratorRuntime","graphQLEnumAdapter","react","react-compiler-runtime","useAPMCompleteCredentialAcquisitionMutation","useAPMUpdateOrderMutation","useECPCometFinalizeCheckoutMutation","useFBPayFetchApplePayMerchantSessionQuery"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l=k||(k=d("react"));e=k;e.useCallback;var m=e.useContext,n=e.useEffect,o=e.useRef,p=e.useState,q={button:{alignItems:"x6s0dn4",borderStartStartRadius:"x1obq294",borderStartEndRadius:"x5a5i1n",borderEndEndRadius:"xde0f50",borderEndStartRadius:"x15x8krk",display:"x78zum5",justifyContent:"xl56j7k",marginTop:"x1xmf6yo",marginBottom:"x1e56ztr",paddingTop:"xyamay9",paddingBottom:"x1l90r2v",$$css:!0},buttonDark:{backgroundColor:"xal61yo",$$css:!0},buttonLight:{backgroundColor:"x14hiurz",borderTopColor:"x1l4vc9z",borderInlineEndColor:"xuwvgg2",borderBottomColor:"xhoyvmc",borderInlineStartColor:"x1dp9ihu",borderTopStyle:"x13fuv20",borderInlineEndStyle:"x18b5jzi",borderBottomStyle:"x1q0q8m5",borderInlineStartStyle:"x1t7ytsu",borderTopWidth:"x178xt8z",borderInlineEndWidth:"x1lun4ml",borderBottomWidth:"xso031l",borderInlineStartWidth:"xpilrb4",$$css:!0},logo:{height:"xxk0z11",objectFit:"x19kjcj4",width:"x14atkfc",$$css:!0}},r={cdsText:{color:"primaryText",textStyle:"body"},fbColor:"primary",fbIsSemanticHeading:!1,fbType:"headlineDeemphasized4",igText:{color:"primaryText",size:"body"}};function s(){var a=d("react-compiler-runtime").c(2),b=p(!1),c=b[0],e=b[1],f;a[0]===Symbol["for"]("react.memo_cache_sentinel")?(b=function(){try{var a=window;a=a.ApplePaySession;if(!a){e(!1);return}a=a.canMakePayments();e(a)}catch(a){e(!1)}},f=[],a[0]=b,a[1]=f):(b=a[0],f=a[1]);n(b,f);return c}function a(a){var e,f=d("react-compiler-runtime").c(45),g=a.buttonColor,k=a.buttonContainerStyle,t=a.buttonLogoStyle,u=a.buttonTextStyle,v=a.isLabelVisible,w=a.onClick,x=a.onOrderFailure,y=a.onOrderSuccess,z=a.onPaymentInfoChange,A=a.orderId,B=a.paymentAccountId,C=a.paymentProductId,D=a.paymentRequestInput,E=a.receiverId,F=a.sessionId;a=g===void 0?"dark":g;g=v===void 0?!0:v;var G=s();v=p(null);var H=v[0],I=v[1];v=c("useFBPayFetchApplePayMerchantSessionQuery")();var J=v[0];v=c("useAPMUpdateOrderMutation")();var K=v[0];v=c("useAPMCompleteCredentialAcquisitionMutation")();var L=v[0],M=c("useECPCometFinalizeCheckoutMutation")();f[0]===Symbol["for"]("react.memo_cache_sentinel")?(v=c("graphQLEnumAdapter")(c("PaymentCredentialTypeEnum")),f[0]=v):v=f[0];var N=v.valueToName.apple_pay;v=m(c("FBPayECPAPMLoggerContext"));var O=v.apmLogger,P=o(!0),Q;f[1]!==O||f[2]!==G||f[3]!==C?(v=function(){G&&P.current===!0&&(O.logClientLoadAPMButtonSuccess("apple_pay",void 0,d("FBPayECPConstantsUtils").APPLE_PAY_BUTTON_VIEW_NAME,C),P.current=!1)},Q=[G,O,C],f[1]=O,f[2]=G,f[3]=C,f[4]=v,f[5]=Q):(v=f[4],Q=f[5]);n(v,Q);f[6]!==O||f[7]!==K||f[8]!==L||f[9]!==J||f[10]!==M||f[11]!==w||f[12]!==x||f[13]!==y||f[14]!==z||f[15]!==A||f[16]!==B||f[17]!==C||f[18]!==D||f[19]!==E||f[20]!==H||f[21]!==F?(v=function(){O.logUserClickAPMButtonAtomic("apple_pay",d("FBPayECPConstantsUtils").APPLE_PAY_BUTTON_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_BUTTON_VIEW_NAME,C);w&&w();var a=function(a){return new(j||(j=b("Promise")))(function(b,d){J({merchant_validation_url:a,order_id:A,product_id:C,session_id:F},function(a){a=a.fetch_apple_pay_merchant_session;a?b(a):d()},function(a){c("FBLogger")("FBPayAPMApplePayButton").mustfix("Failed to fetch Apple Pay merchant session: %s",a.message),d(a)})})},e=function(a){var c=a.paymentMethod,e=a.shippingContact;a=a.shippingMethod;var f=c?N:null,g=e?d("FBPayECPApplePayUtils").getShippingAddressInputFromApplePayPaymentContact(e):null,h=a?d("FBPayECPApplePayUtils").getECPShippingOptionFromApplePayShippingMethod(a,D.currencyCode):null;h&&I(h);return new(j||(j=b("Promise")))(function(a,b){K({onCompleted:function(b){b=b==null?void 0:b.apm_update_order_mutation;var c=b==null?void 0:b.price_items;b=b==null?void 0:b.total_price;c=c?d("FBPayECPApplePayUtils").getApplePayLineItemsFromECPPriceItems(c):[];a({newLineItems:c,newTotal:b?{amount:(c=(c=b.amount)==null?void 0:c.amount)!=null?c:"0",label:(c=b.label)!=null?c:"",type:(c=b.type)!=null?c:"final"}:null})},onError:function(a){b(a)},variables:{input:{credential_type:N,order_id:A,payment_account_id:B,product_id:C,selected_payment_method_type:f!=null?f:void 0,selected_shipping_address:g!=null?g:void 0,selected_shipping_option:h!=null?h:void 0,session_id:F}}})})},f=babelHelpers["extends"]({},D,{supportedNetworks:d("FBPayECPApplePayUtils").getSupportedApplePayNetworks(D.supportedNetworks)}),g=window,h=g.ApplePaySession,i=new h(3,f);i.onvalidatemerchant=function(){var c=b("asyncToGeneratorRuntime").asyncToGenerator(function*(b){O.logClientVerifyApplepayInit(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_MERCHANT_VALIDATION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{b=(yield a(b.validationURL));i.completeMerchantValidation(b);O.logClientVerifyApplepaySuccess(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_MERCHANT_VALIDATION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(a){b=a;O.logClientVerifyApplepayFail(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_MERCHANT_VALIDATION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:b instanceof Error?b.message:"Unknown error"});i.abort()}});return function(a){return c.apply(this,arguments)}}();i.onpaymentmethodselected=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a){O.logClientSelectApplepayInit(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_PAYMENT_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{a=(yield e({paymentMethod:a.paymentMethod}));i.completePaymentMethodSelection(a);z&&z({infoType:d("FBPayECPApplePayUtils").ApplePayPaymentInfo.PAYMENT_METHOD});O.logClientSelectApplepaySuccess(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_PAYMENT_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(b){a=b;O.logClientSelectApplepayFail(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_PAYMENT_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:a instanceof Error?a.message:"Unknown error"});i.abort()}});return function(b){return a.apply(this,arguments)}}();i.onshippingmethodselected=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a){O.logClientSelectApplepayInit(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{a=(yield e({shippingMethod:a.shippingMethod}));i.completeShippingMethodSelection(a);z&&z({infoType:d("FBPayECPApplePayUtils").ApplePayPaymentInfo.SHIPPING_METHOD});O.logClientSelectApplepaySuccess(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(b){a=b;O.logClientSelectApplepayFail(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:a instanceof Error?a.message:"Unknown error"});i.abort()}});return function(b){return a.apply(this,arguments)}}();i.onshippingcontactselected=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a){O.logClientSelectApplepayInit(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{a=(yield e({shippingContact:a.shippingContact}));i.completeShippingContactSelection({newLineItems:a.newLineItems,newShippingMethods:[],newTotal:a.newTotal,status:h.STATUS_SUCCESS});z&&z({infoType:d("FBPayECPApplePayUtils").ApplePayPaymentInfo.SHIPPING_CONTACT});O.logClientSelectApplepaySuccess(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(b){a=b;O.logClientSelectApplepayFail(C,A,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:a instanceof Error?a.message:"Unknown error"});i.completeShippingContactSelection({status:h.STATUS_FAILURE})}});return function(b){return a.apply(this,arguments)}}();i.onpaymentauthorized=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a){O.logClientExecuteApplepayInit(C,A,void 0,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{var c=a.payment,e=c.token,f=(yield new(j||(j=b("Promise")))(function(a,b){L({onCompleted:function(c){var d,e,f,g=c==null||(d=c.complete_credential_acquisition)==null||(d=d.response)==null?void 0:d.credential_id,h=c==null||(e=c.complete_credential_acquisition)==null||(e=e.response)==null?void 0:e.shipping_address_id;c=c==null||(f=c.complete_credential_acquisition)==null?void 0:f.error;if(c!=null||g==null){b(c);return}a({credentialId:g,shippingAddressId:h})},onError:function(a){b(a)},variables:{input:{complete_credential_acquisition_request:{checkout_session_id:F,merchant_routing_country:D.countryCode,payment_account_id:B,payment_product_id:C,processor_data:{external_shipping_address:c.shippingContact?d("FBPayECPApplePayUtils").getShippingAddressInputFromApplePayPaymentContact(c.shippingContact):null,processor_token:JSON.stringify(e)},receiver_info:{receiver_id:E}},credential_type:N,session_id:F}}})}));a=(yield new j(function(a,b){var e,g=c.shippingContact?d("FBPayECPApplePayUtils").getShippingAddressInputFromApplePayPaymentContact(c.shippingContact):null;M({auth_factors:{platform_trust_token:""},checkout_info_fields:{payer_email:(e=c.shippingContact)==null?void 0:e.emailAddress,payer_name:g==null?void 0:g.care_of,payer_phone:(e=c.shippingContact)==null?void 0:e.phoneNumber,selected_shipping_option:H,shipping_address_details:{address:g,address_id:(e=f.shippingAddressId)!=null?e:""}},country_code:D.countryCode,credentials:[{charge_amount:{amount:D.total.amount,currency_code:D.currencyCode},credential_id:f.credentialId,credential_type:N}],ecp_order_id:A,one_time_checkout_input:{otc_session_id:F,otc_type:"APPLE_PAY"},pay_button_click_id:d("FBPayJsUtils").uuidv4(),payment_product_id:C,payment_request_id:d("FBPayJsUtils").uuidv4(),receiver_info:[{charge_amount:{amount:D.total.amount,currency_code:D.currencyCode},receiver_id:E}],upl_session_id:F},function(c){var d,e,f=c==null||(d=c.ecp_finalize_checkout)==null?void 0:d.error;c=c==null||(e=c.ecp_finalize_checkout)==null?void 0:e.checkout_status;if(f!=null){b(f);return}a({checkoutStatus:c})},function(a){b(a)},d("FBPayECPConstantsUtils").APM_CREDENTIAL_VIEW_NAME,void 0,f.credentialId,"apple_pay")}));i.completePayment(h.STATUS_SUCCESS);y&&y({checkoutStatus:a.checkoutStatus});O.logClientExecuteApplepaySuccess(C,A,void 0,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(b){a=b;O.logClientExecuteApplepayFail(C,A,void 0,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:a instanceof Error?a.message:"Unknown error"});i.completePayment(h.STATUS_FAILURE);x&&x({error:a})}});return function(b){return a.apply(this,arguments)}}();i.oncancel=function(){O.logClientCancelApplepaySuccess(C,A,void 0,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)};i.begin()},f[6]=O,f[7]=K,f[8]=L,f[9]=J,f[10]=M,f[11]=w,f[12]=x,f[13]=y,f[14]=z,f[15]=A,f[16]=B,f[17]=C,f[18]=D,f[19]=E,f[20]=H,f[21]=F,f[22]=v):v=f[22];Q=v;if(!G)return null;v=a==="dark";a=v?q.buttonDark:q.buttonLight;v=(v=u==null?void 0:u.cdsText)!=null?v:r.cdsText;e=(e=u==null?void 0:u.igText)!=null?e:r.igText;var R;f[23]!==u||f[24]!==v||f[25]!==e?(R=babelHelpers["extends"]({},r,u,{cdsText:v,igText:e}),f[23]=u,f[24]=v,f[25]=e,f[26]=R):R=f[26];u=R;f[27]===Symbol["for"]("react.memo_cache_sentinel")?(v=h._(/*BTDS*/"Pay with Apple Pay"),f[27]=v):v=f[27];f[28]!==a||f[29]!==k?(e=[q.button,a,k],f[28]=a,f[29]=k,f[30]=e):e=f[30];f[31]===Symbol["for"]("react.memo_cache_sentinel")?(R={className:"x6s0dn4 xfex06f x78zum5"},f[31]=R):R=f[31];f[32]!==g||f[33]!==u?(a=g&&l.jsx(c("FBPayECPText.react"),babelHelpers["extends"]({},u,{children:h._(/*BTDS*/"Pay with")})),f[32]=g,f[33]=u,f[34]=a):a=f[34];f[35]===Symbol["for"]("react.memo_cache_sentinel")?(k=i("920249"),f[35]=k):k=f[35];f[36]!==t?(g=l.jsx(c("CometImage.react"),{src:k,xstyle:[q.logo,t]}),f[36]=t,f[37]=g):g=f[37];f[38]!==a||f[39]!==g?(u=l.jsxs("div",babelHelpers["extends"]({},R,{children:[a,g]})),f[38]=a,f[39]=g,f[40]=u):u=f[40];f[41]!==Q||f[42]!==e||f[43]!==u?(k=l.jsx(c("CometPressable.react"),{"aria-label":v,label:"apple-pay-button",onPress:Q,testid:void 0,xstyle:e,children:u}),f[41]=Q,f[42]=e,f[43]=u,f[44]=k):k=f[44];return k}g["default"]=a}),226);
-----
useAPMUpdateOrderMutation.oculus.graphql",[],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],b=[{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,concreteType:"CurrencyAmount",kind:"LinkedField",name:"amount",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"amount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"currency",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}];b=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"APMUpdateOrderPayload",kind:"LinkedField",name:"apm_update_order_mutation",plural:!1,selections:[{alias:null,args:null,concreteType:"ECPPriceInfo",kind:"LinkedField",name:"price_items",plural:!0,selections:b,storageKey:null},{alias:null,args:null,concreteType:"ECPPriceInfo",kind:"LinkedField",name:"total_price",plural:!1,selections:b,storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"useAPMUpdateOrderMutation",selections:b,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"useAPMUpdateOrderMutation",selections:b},params:{id:"25095133986760780",metadata:{},name:"useAPMUpdateOrderMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
useAPMUpdateOrderMutation.facebook.graphql",["useAPMUpdateOrderMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,concreteType:"CurrencyAmount",kind:"LinkedField",name:"amount",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"amount",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"currency",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}];c=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"APMUpdateOrderPayload",kind:"LinkedField",name:"apm_update_order_mutation",plural:!1,selections:[{alias:null,args:null,concreteType:"ECPPriceInfo",kind:"LinkedField",name:"price_items",plural:!0,selections:c,storageKey:null},{alias:null,args:null,concreteType:"ECPPriceInfo",kind:"LinkedField",name:"total_price",plural:!1,selections:c,storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"useAPMUpdateOrderMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"useAPMUpdateOrderMutation",selections:c},params:{id:b("useAPMUpdateOrderMutation_facebookRelayOperation"),metadata:{},name:"useAPMUpdateOrderMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
useAPMUpdateOrderMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="25095133986760780"}),null);
-----
useAPMUpdateOrderMutation",["CometRelay","useAPMUpdateOrderMutation.graphql"],(function(a,b,c,d,e,f,g){"use strict";var h,i=h!==void 0?h:h=b("useAPMUpdateOrderMutation.graphql");function a(){return d("CometRelay").useMutation(i,"enqueue")}g["default"]=a}),98);
-----
FBPayECPApplePayButton.react",["fbt","ix","CometImage.react","CometPressable.react","FBLogger","FBPayECPAPMLoggerContext","FBPayECPApplePayUtils","FBPayECPConstantsUtils","FBPayECPText.react","FBPayJsUtils","PaymentCredentialTypeEnum","Promise","asyncToGeneratorRuntime","graphQLEnumAdapter","react","react-compiler-runtime","useAPMCompleteCredentialAcquisitionMutation","useAPMUpdateOrderMutation","useECPCometFinalizeCheckoutMutation","useFBPayFetchApplePayMerchantSessionQuery"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l=k||(k=d("react"));e=k;e.useCallback;var m=e.useContext,n=e.useEffect,o=e.useRef,p=e.useState,q={button:{alignItems:"x6s0dn4",borderStartStartRadius:"x1obq294",borderStartEndRadius:"x5a5i1n",borderEndEndRadius:"xde0f50",borderEndStartRadius:"x15x8krk",display:"x78zum5",justifyContent:"xl56j7k",marginTop:"x1xmf6yo",marginBottom:"x1e56ztr",paddingTop:"xyamay9",paddingBottom:"x1l90r2v",$$css:!0},buttonDark:{backgroundColor:"xal61yo",$$css:!0},buttonLight:{backgroundColor:"x14hiurz",borderTopColor:"x1l4vc9z",borderInlineEndColor:"xuwvgg2",borderBottomColor:"xhoyvmc",borderInlineStartColor:"x1dp9ihu",borderTopStyle:"x13fuv20",borderInlineEndStyle:"x18b5jzi",borderBottomStyle:"x1q0q8m5",borderInlineStartStyle:"x1t7ytsu",borderTopWidth:"x178xt8z",borderInlineEndWidth:"x1lun4ml",borderBottomWidth:"xso031l",borderInlineStartWidth:"xpilrb4",$$css:!0},logo:{height:"xxk0z11",objectFit:"x19kjcj4",width:"x14atkfc",$$css:!0}},r={cdsText:{color:"primaryText",textStyle:"body"},fbColor:"primary",fbIsSemanticHeading:!1,fbType:"headlineDeemphasized4",igText:{color:"primaryText",size:"body"}};function s(){var a=d("react-compiler-runtime").c(2),b=p(!1),c=b[0],e=b[1],f;a[0]===Symbol["for"]("react.memo_cache_sentinel")?(b=function(){try{var a=window;a=a.ApplePaySession;if(!a){e(!1);return}a=a.canMakePayments();e(a)}catch(a){e(!1)}},f=[],a[0]=b,a[1]=f):(b=a[0],f=a[1]);n(b,f);return c}function a(a){var e,f=d("react-compiler-runtime").c(44),g=a.buttonColor,k=a.buttonContainerStyle,t=a.buttonLogoStyle,u=a.buttonTextStyle,v=a.isLabelVisible,w=a.onClick,x=a.onOrderFailure,y=a.onOrderSuccess,z=a.orderId,A=a.paymentAccountId,B=a.paymentProductId,C=a.paymentRequestInput,D=a.receiverId,E=a.sessionId;a=g===void 0?"dark":g;g=v===void 0?!0:v;var F=s();v=p(null);var G=v[0],H=v[1];v=c("useFBPayFetchApplePayMerchantSessionQuery")();var I=v[0];v=c("useAPMUpdateOrderMutation")();var J=v[0];v=c("useAPMCompleteCredentialAcquisitionMutation")();var K=v[0],L=c("useECPCometFinalizeCheckoutMutation")();f[0]===Symbol["for"]("react.memo_cache_sentinel")?(v=c("graphQLEnumAdapter")(c("PaymentCredentialTypeEnum")),f[0]=v):v=f[0];var M=v.valueToName.apple_pay;v=m(c("FBPayECPAPMLoggerContext"));var N=v.apmLogger,O=o(!0),P;f[1]!==N||f[2]!==F||f[3]!==B?(v=function(){F&&O.current===!0&&(N.logClientLoadAPMButtonSuccess("apple_pay",void 0,d("FBPayECPConstantsUtils").APPLE_PAY_BUTTON_VIEW_NAME,B),O.current=!1)},P=[F,N,B],f[1]=N,f[2]=F,f[3]=B,f[4]=v,f[5]=P):(v=f[4],P=f[5]);n(v,P);f[6]!==N||f[7]!==J||f[8]!==K||f[9]!==I||f[10]!==L||f[11]!==w||f[12]!==x||f[13]!==y||f[14]!==z||f[15]!==A||f[16]!==B||f[17]!==C||f[18]!==D||f[19]!==G||f[20]!==E?(v=function(){N.logUserClickAPMButtonAtomic("apple_pay",d("FBPayECPConstantsUtils").APPLE_PAY_BUTTON_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_BUTTON_VIEW_NAME,B);w&&w();var a=function(a){return new(j||(j=b("Promise")))(function(b,d){I({merchant_validation_url:a,order_id:z,product_id:B,session_id:E},function(a){a=a.fetch_apple_pay_merchant_session;a?b(a):d()},function(a){c("FBLogger")("FBPayECPApplePayButton").mustfix("Failed to fetch Apple Pay merchant session: %s",a.message),d(a)})})},e=function(a){var c=a.paymentMethod,e=a.shippingContact;a=a.shippingMethod;var f=c?M:null,g=e?d("FBPayECPApplePayUtils").getShippingAddressInputFromApplePayPaymentContact(e):null,h=a?d("FBPayECPApplePayUtils").getECPShippingOptionFromApplePayShippingMethod(a,C.currencyCode):null;h&&H(h);return new(j||(j=b("Promise")))(function(a,b){J({onCompleted:function(b){b=b==null?void 0:b.apm_update_order_mutation;var c=b==null?void 0:b.price_items;b=b==null?void 0:b.total_price;c=c?d("FBPayECPApplePayUtils").getApplePayLineItemsFromECPPriceItems(c):[];a({newLineItems:c,newTotal:b?{amount:(c=(c=b.amount)==null?void 0:c.amount)!=null?c:"0",label:(c=b.label)!=null?c:"",type:(c=b.type)!=null?c:"final"}:null})},onError:function(a){b(a)},variables:{input:{credential_type:M,order_id:z,payment_account_id:A,product_id:B,selected_payment_method_type:f!=null?f:void 0,selected_shipping_address:g!=null?g:void 0,selected_shipping_option:h!=null?h:void 0,session_id:E}}})})},f=window,g=f.ApplePaySession,h=new g(3,babelHelpers["extends"]({},C));h.onvalidatemerchant=function(){var c=b("asyncToGeneratorRuntime").asyncToGenerator(function*(b){N.logClientVerifyApplepayInit(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_MERCHANT_VALIDATION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{b=(yield a(b.validationURL));h.completeMerchantValidation(b);N.logClientVerifyApplepaySuccess(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_MERCHANT_VALIDATION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(a){b=a;N.logClientVerifyApplepayFail(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_MERCHANT_VALIDATION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:b instanceof Error?b.message:"Unknown error"});h.abort()}});return function(a){return c.apply(this,arguments)}}();h.onpaymentmethodselected=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a){N.logClientSelectApplepayInit(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_PAYMENT_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{a=(yield e({paymentMethod:a.paymentMethod}));h.completePaymentMethodSelection(a);N.logClientSelectApplepaySuccess(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_PAYMENT_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(b){a=b;N.logClientSelectApplepayFail(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_PAYMENT_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:a instanceof Error?a.message:"Unknown error"});h.abort()}});return function(b){return a.apply(this,arguments)}}();h.onshippingmethodselected=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a){N.logClientSelectApplepayInit(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{a=(yield e({shippingMethod:a.shippingMethod}));h.completeShippingMethodSelection(a);N.logClientSelectApplepaySuccess(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(b){a=b;N.logClientSelectApplepayFail(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_METHOD_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:a instanceof Error?a.message:"Unknown error"});h.abort()}});return function(b){return a.apply(this,arguments)}}();h.onshippingcontactselected=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a){N.logClientSelectApplepayInit(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{a=(yield e({shippingContact:a.shippingContact}));h.completeShippingContactSelection({newLineItems:a.newLineItems,newShippingMethods:[],newTotal:a.newTotal,status:g.STATUS_SUCCESS});N.logClientSelectApplepaySuccess(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(b){a=b;N.logClientSelectApplepayFail(B,z,d("FBPayECPConstantsUtils").APPLE_PAY_SHIPPING_CONTACT_SELECTION_TARGET_NAME,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:a instanceof Error?a.message:"Unknown error"});h.completeShippingContactSelection({status:g.STATUS_FAILURE})}});return function(b){return a.apply(this,arguments)}}();h.onpaymentauthorized=function(){var a=b("asyncToGeneratorRuntime").asyncToGenerator(function*(a){N.logClientExecuteApplepayInit(B,z,void 0,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME);try{var c=a.payment,e=c.token,f=(yield new(j||(j=b("Promise")))(function(a,b){K({onCompleted:function(c){var d,e,f,g=c==null||(d=c.complete_credential_acquisition)==null||(d=d.response)==null?void 0:d.credential_id,h=c==null||(e=c.complete_credential_acquisition)==null||(e=e.response)==null?void 0:e.shipping_address_id;c=c==null||(f=c.complete_credential_acquisition)==null?void 0:f.error;if(c!=null||g==null){b(c);return}a({credentialId:g,shippingAddressId:h})},onError:function(a){b(a)},variables:{input:{complete_credential_acquisition_request:{checkout_session_id:E,merchant_routing_country:C.countryCode,payment_account_id:A,payment_product_id:B,processor_data:{external_shipping_address:c.shippingContact?d("FBPayECPApplePayUtils").getShippingAddressInputFromApplePayPaymentContact(c.shippingContact):null,processor_token:JSON.stringify(e)},receiver_info:{receiver_id:D}},credential_type:M,session_id:E}}})}));a=(yield new j(function(a,b){var e,g=c.shippingContact?d("FBPayECPApplePayUtils").getShippingAddressInputFromApplePayPaymentContact(c.shippingContact):null;L({auth_factors:{platform_trust_token:""},checkout_info_fields:{payer_email:(e=c.shippingContact)==null?void 0:e.emailAddress,payer_name:g==null?void 0:g.care_of,payer_phone:(e=c.shippingContact)==null?void 0:e.phoneNumber,selected_shipping_option:G,shipping_address_details:{address:g,address_id:(e=f.shippingAddressId)!=null?e:""}},country_code:C.countryCode,credentials:[{charge_amount:{amount:C.total.amount,currency_code:C.currencyCode},credential_id:f.credentialId,credential_type:M}],ecp_order_id:z,one_time_checkout_input:{otc_session_id:E,otc_type:"APPLE_PAY"},pay_button_click_id:d("FBPayJsUtils").uuidv4(),payment_product_id:B,payment_request_id:d("FBPayJsUtils").uuidv4(),receiver_info:[{charge_amount:{amount:C.total.amount,currency_code:C.currencyCode},receiver_id:D}],upl_session_id:E},function(c){var d,e,f=c==null||(d=c.ecp_finalize_checkout)==null?void 0:d.error;c=c==null||(e=c.ecp_finalize_checkout)==null?void 0:e.checkout_status;if(f!=null){b(f);return}a({checkoutStatus:c})},function(a){b(a)},d("FBPayECPConstantsUtils").APM_CREDENTIAL_VIEW_NAME,void 0,f.credentialId,"apple_pay")}));h.completePayment(g.STATUS_SUCCESS);y&&y({checkoutStatus:a.checkoutStatus});N.logClientExecuteApplepaySuccess(B,z,void 0,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)}catch(b){a=b;N.logClientExecuteApplepayFail(B,z,void 0,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME,{error_message:a instanceof Error?a.message:"Unknown error"});h.completePayment(g.STATUS_FAILURE);x&&x({error:a})}});return function(b){return a.apply(this,arguments)}}();h.oncancel=function(){N.logClientCancelApplepaySuccess(B,z,void 0,d("FBPayECPConstantsUtils").APPLE_PAY_MODAL_VIEW_NAME)};h.begin()},f[6]=N,f[7]=J,f[8]=K,f[9]=I,f[10]=L,f[11]=w,f[12]=x,f[13]=y,f[14]=z,f[15]=A,f[16]=B,f[17]=C,f[18]=D,f[19]=G,f[20]=E,f[21]=v):v=f[21];P=v;if(!F)return null;v=a==="dark";a=v?q.buttonDark:q.buttonLight;v=(v=u==null?void 0:u.cdsText)!=null?v:r.cdsText;e=(e=u==null?void 0:u.igText)!=null?e:r.igText;var Q;f[22]!==u||f[23]!==v||f[24]!==e?(Q=babelHelpers["extends"]({},r,u,{cdsText:v,igText:e}),f[22]=u,f[23]=v,f[24]=e,f[25]=Q):Q=f[25];u=Q;f[26]===Symbol["for"]("react.memo_cache_sentinel")?(v=h._(/*BTDS*/"Pay with Apple Pay"),f[26]=v):v=f[26];f[27]!==a||f[28]!==k?(e=[q.button,a,k],f[27]=a,f[28]=k,f[29]=e):e=f[29];f[30]===Symbol["for"]("react.memo_cache_sentinel")?(Q={className:"x6s0dn4 xfex06f x78zum5"},f[30]=Q):Q=f[30];f[31]!==g||f[32]!==u?(a=g&&l.jsx(c("FBPayECPText.react"),babelHelpers["extends"]({},u,{children:h._(/*BTDS*/"Pay with")})),f[31]=g,f[32]=u,f[33]=a):a=f[33];f[34]===Symbol["for"]("react.memo_cache_sentinel")?(k=i("920249"),f[34]=k):k=f[34];f[35]!==t?(g=l.jsx(c("CometImage.react"),{src:k,xstyle:[q.logo,t]}),f[35]=t,f[36]=g):g=f[36];f[37]!==a||f[38]!==g?(u=l.jsxs("div",babelHelpers["extends"]({},Q,{children:[a,g]})),f[37]=a,f[38]=g,f[39]=u):u=f[39];f[40]!==P||f[41]!==e||f[42]!==u?(k=l.jsx(c("CometPressable.react"),{"aria-label":v,label:"apple-pay-button",onPress:P,testid:void 0,xstyle:e,children:u}),f[40]=P,f[41]=e,f[42]=u,f[43]=k):k=f[43];return k}g["default"]=a}),226);
-----
useAPMUpdateOrderMutation.graphql",["cr:13450"],(function(a,b,c,d,e,f,g){"use strict";f.exports=b("cr:13450")}),34);
-----