1"use strict";(self.webpackChunknyp_membership=self.webpackChunknyp_membership||[]).push([[98],{98:function(e,t,n){n.d(t,{h:function(){return T}});var o=n(1085),s=n(4041),i=n(9067),r=n.n(i),c=n(7309),d=n(4120),a=n(2906),u=n(2205),l=n(8188),p=n(7682),h=n(3373),m=n.n(h),y=n(4483),f=n(3873),_=n(7093),b=function(e,t,n,o){return new(n||(n=Promise))(function(s,i){function r(e){try{d(o.next(e))}catch(e){i(e)}}function c(e){try{d(o.throw(e))}catch(e){i(e)}}function d(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}d((o=o.apply(e,t||[])).next())})};const v=({method:e,onSubmitSuccess:t=null,onSubmitError:n=null,onCancel:i=null})=>{var r,a;const[u,h]=(0,s.useState)(null),[v,g]=(0,s.useState)([]),[x,F]=(0,s.useState)(!1),j=(0,s.useRef)(!1),N=null!==(a=null===(r=e.expiration_date)||void 0===r?void 0:r.replace("/20","/"))&&void 0!==a?a:"",E=(0,s.useMemo)(()=>({cardholderName:e.card_holder_name,expirationDate:N,postalCode:e.zipcode,cardNumberPlaceholder:e.card_number_masked}),[e.card_holder_name,N,e.zipcode,e.card_number_masked]),{isReady:k,error:w,focusedField:C,cardType:M,isFormValid:R,tokenize:D,fieldSelectors:S}=(0,d.nm)({authorization:null!=u?u:"",prefill:E,styles:l.nO}),{execute:A,ReCAPTCHA:T}=(0,d.Vq)();if((0,s.useEffect)(()=>{b(void 0,void 0,void 0,function*(){const e=yield(0,_.gf)();h(e)})},[]),(0,s.useEffect)(()=>{b(void 0,void 0,void 0,function*(){const e=yield(0,_.sF)();g(e),F(!0)})},[]),!u)return(0,o.jsx)(p.Ip,{});if(x&&(e=>{if(e.length<3)return!1;const t=[...e].sort((e,t)=>Date.parse(t)-Date.parse(e));return new Date(t[2])>(0,y.W)(new Date,{days:-7})})(v)){const e=(e=>{const t=[...e].sort((e,t)=>Date.parse(t)-Date.parse(e)),n=new Date(t[2]),o=(0,y.W)(n,{days:8});return(0,f.GP)(o,"MMMM d, yyyy")})(v);return(0,o.jsxs)("p",{children:["It looks like youâve recently changed your payment information. To protect your account, another change cannot be made at this time. Please try again on or after"," ",(0,o.jsx)("strong",{children:e}),". If you have any questions, please contact Post Sports+ customer service at:Â ",(0,o.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]})}return(0,o.jsxs)("div",{id:"edit-form",className:"pay-by-card edit-form-v2 grid-container-responsive payment-method__edit-form m-top p-top b-top",children:[(0,o.jsx)("h4",{className:"sub-heading--semi",children:(0,c.__)("Edit credit card","nypost")}),(0,o.jsx)("div",{className:"input-container input-container--submit grid-container",children:(0,o.jsxs)("div",{className:"braintree-form-container grid-col grid-col-10",children:[(0,o.jsx)(T,{}),(0,o.jsxs)("div",{className:"braintree-form",children:[((e="")=>{if(!e)return null;const t={payByCard:{message:e}};return(0,o.jsx)(p.dF,{errors:t})})(w),(0,o.jsx)("div",{className:"input-wrapper",children:(0,o.jsx)("div",{id:S.cardholderName,className:m()("braintree-hosted-field",{focused:C===l.yr.CARD_HOLDER_NAME})})}),(0,o.jsxs)("div",{className:"input-wrapper",children:[(0,o.jsx)("div",{id:S.number,className:m()("braintree-hosted-field",{focused:C===l.yr.NUMBER})}),(0,o.jsx)("span",{className:"card-type","data-card-type":M})]}),(0,o.jsxs)("div",{className:"input-wrapper flex-direction-row",children:[(0,o.jsx)("div",{id:S.expirationDate,className:m()("braintree-hosted-field",{focused:C===l.yr.EXPIRATION_DATE})}),(0,o.jsx)("div",{id:S.cvv,className:m()("braintree-hosted-field",{focused:C===l.yr.CVV})})]}),(0,o.jsx)("div",{className:"input-wrapper",children:(0,o.jsx)("div",{id:S.postalCode,className:m()("braintree-hosted-field",{focused:C===l.yr.POSTAL_CODE})})})]}),(0,o.jsxs)("div",{className:"input-container input-container--submit",children:[(0,o.jsx)("button",{className:"button button--solid button--solid--alt","data-testid":"editupdate",type:"button",onClick:()=>b(void 0,void 0,void 0,function*(){if(!j.current){try{yield A()}catch(e){return}try{const{nonce:o}=yield D(),s=yield(0,_.zA)({token:e.token,nonce:o});"success"===s.status?((0,_.hC)(),j.current=!0,t&&"function"==typeof t&&t({token:e.token})):n&&"function"==typeof n&&n({error:s.message||(0,c.__)("There was a problem updating your credit card. Please try again.","nypost"),shouldCloseForm:!1})}catch(e){n&&"function"==typeof n&&n({error:e.message,shouldCloseForm:!0})}}}),disabled:!R||!k,children:(0,c.__)("Update","nypost")}),i&&"function"==typeof i&&(0,o.jsx)("button",{className:"button button--secondary",type:"button","data-testid":"editcancel",onClick:i,children:(0,c.__)("Cancel","nypost")})]})]})})]})};var g=n(6508);function x({method:{last_4:e,token:t},setMethodFunction:n,removeFunction:s,setSuccessFunction:i,setErrorFunction:r}){const{deletePaymentMethod:a}=(0,d.XL)(),u=()=>{return e=this,o=void 0,u=function*(){try{(yield a.mutateAsync({token:t}))&&(n(""),s(t),i((0,c.__)("Success! Your credit card has been removed.","nypost")))}catch(e){n(""),r(e.message)}},new((d=void 0)||(d=Promise))(function(t,n){function s(e){try{r(u.next(e))}catch(e){n(e)}}function i(e){try{r(u.throw(e))}catch(e){n(e)}}function r(e){var n;e.done?t(e.value):(n=e.value,n instanceof d?n:new d(function(e){e(n)})).then(s,i)}r((u=u.apply(e,o||[])).next())});var e,o,d,u};return(0,o.jsxs)("div",{id:"remove-confirmation",className:"grid-container-responsive payment-method__remove-confirmation m-top p-top b-top",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"headline--xs-semi",children:(0,c.__)("Remove credit card","nypost")}),(0,o.jsx)("p",{children:(0,c.nv)((0,c.__)("Are you sure you would like to remove your credit card ending in %s?","nypost"),e)})]}),(0,o.jsxs)("div",{className:"input-container input-container--submit",children:[(0,o.jsx)("button",{className:"button button--solid button--solid--alt",style:{width:"100%"},"data-testid":"confirmremove",type:"submit",onClick:()=>{u()},children:(0,c.__)("Remove","nypost")}),(0,o.jsx)("button",{className:"button button--secondary",style:{width:"100%"},type:"button","data-testid":"confirmcancel",onClick:()=>{n("")},children:(0,c.__)("Cancel","nypost")})]})]})}
1x.propTypes={method:r().shape({card_type:r().string,last_4:r().string,default:r().bool,token:r().string}).isRequired,setMethodFunction:r().func.isRequired,removeFunction:r().func.isRequired,setSuccessFunction:r().func.isRequired,setErrorFunction:r().func.isRequired};var F=n(8758);const j=({method:e,toggleEditFunction:t,toggleDeleteFunction:n})=>(0,o.jsxs)("div",{className:"payment-method__buttons",children:["CreditCard"===e.type&&(0,o.jsx)("button",{type:"button",className:"button button--secondary button--secondary-sm button-edit",onClick:()=>{t(e)},children:(0,c.__)("Edit","nypost")}),!e.has_active_subscription&&(0,o.jsx)("button",{type:"button",className:"button button--secondary button--secondary-sm button-remove",onClick:()=>{n(e)},children:(0,c.__)("Remove","nypost")})]});j.propTypes={method:r().shape({has_active_subscription:r().bool,type:r().string}).isRequired,toggleDeleteFunction:r().func.isRequired,toggleEditFunction:r().func.isRequired};const N=({method:e,toggleEditFunction:t,toggleDeleteFunction:n})=>(0,o.jsx)("div",{className:"payment-method__buttons payment-method__button-links",children:(0,o.jsxs)("ul",{children:["CreditCard"===e.type&&(0,o.jsx)("li",{className:m()({"button-links--separator":!e.has_active_subscription}),children:(0,o.jsx)("button",{type:"button",className:"button button--secondary-sm button-link button-edit",onClick:()=>{t(e)},children:(0,c.__)("Edit","nypost")})}),!e.has_active_subscription&&(0,o.jsx)("li",{children:(0,o.jsx)("button",{type:"button",className:"button button--secondary-sm button-link button-remove",onClick:()=>{n(e)},children:(0,c.__)("Remove","nypost")})})]})});N.propTypes={method:r().shape({has_active_subscription:r().bool,type:r().string}).isRequired,toggleDeleteFunction:r().func.isRequired,toggleEditFunction:r().func.isRequired};const E=({buttonLinks:e=!1,method:t,subscriptionId:n=null,toggleDeleteFunction:s,toggleEditFunction:i,selectDefaultFunction:r,showButtons:a=!0,showExpiringWarning:u=!1})=>{const{state:{data:{activeSubscription:l={}}}}=(0,d.QW)(),{operations:p}=(0,d.mu)();return(0,o.jsxs)("div",{className:"payment-method",children:[(0,o.jsxs)("div",{className:"payment-method__radios",children:[(0,o.jsx)("input",{className:"payment-method__input",type:"radio",checked:t.default,name:"payment-method",id:`payment-method-${t.token}`,onChange:()=>{return e=void 0,o=void 0,i=function*(){yield r(t.token,n)},new((s=void 0)||(s=Promise))(function(t,n){function r(e){try{d(i.next(e))}catch(e){n(e)}}function c(e){try{d(i.throw(e))}catch(e){n(e)}}function d(e){var n;e.done?t(e.value):(n=e.value,n instanceof s?n:new s(function(e){e(n)})).then(r,c)}d((i=i.apply(e,o||[])).next())});var e,o,s,i},value:t.token,"data-testid":`payment-method-${t.token}`}),(0,o.jsxs)("label",{className:"payment-method__label",htmlFor:`payment-method-${t.token}`,children:[(0,o.jsx)("div",{className:"payment-method__radio"}),(0,o.jsx)("div",{className:"payment-method__icon",style:{backgroundImage:`url("${t.image}")`},children:(0,o.jsx)("span",{className:"screen-reader-text",children:t.card_type})}),(0,o.jsx)("div",{className:"payment-method__text",children:"CreditCard"===t.type?(0,c.__)("Pay with card ending ","nypost")+t.last_4:(0,c.__)("Pay with ","nypost")+t.type.replace(/([A-Z])/g," $1")})]}),u?(0,F.A)(l)?"":p.isPaymentMethodExpiring(t)?(0,o.jsx)("span",{className:"payment-method__expire-warning t-bold",children:(0,c.__)("Expiring soon! Please update.","nypost")}):p.isPaymentMethodExpired(t)?(0,o.jsx)("span",{className:"payment-method__expire-warning t-bold",children:(0,c.__)("Expired! Please update.","nypost")}):"":""]}),!e&&a?(0,o.jsx)(j,{method:t,toggleDeleteFunction:s,toggleEditFunction:i}):null,e&&a?(0,o.jsx)(N,{method:t,toggleDeleteFunction:s,toggleEditFunction:i}):null]})};E.propTypes={buttonLinks:r().bool,method:r().shape({id:r().number,card_type:r().string,last_4:r().string,active:r().bool,default:r().bool,image:r().string,email:r().string,has_active_subscription:r().bool,cardholder_name:r().string,zip:r().string,expiration:r().string,sanitized_number:r().string,type:r().string,token:r().string,nonce:r().str
1ing,expired:r().bool,expiring_soon:r().bool}).isRequired,subscriptionId:r().string,toggleDeleteFunction:r().func.isRequired,toggleEditFunction:r().func.isRequired,selectDefaultFunction:r().func.isRequired,showButtons:r().bool,showExpiringWarning:r().bool};var k=n(9188),w=n(2642),C=function(e,t,n,o){return new(n||(n=Promise))(function(s,i){function r(e){try{d(o.next(e))}catch(e){i(e)}}function c(e){try{d(o.throw(e))}catch(e){i(e)}}function d(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,c)}d((o=o.apply(e,t||[])).next())})};function M({method:{token:e,card_holder_name:t,zipcode:n,expiration_date:i,card_number_masked:r},setMethodFunction:a,updateFunction:u,setSuccessFunction:h,setErrorFunction:f,scrollToFunction:b}){const{state:v,operations:g,refs:x}=(0,d.fF)(),{updatePaymentMethod:F}=(0,d.XL)(),[j,N]=(0,s.useState)(!1),[E,M]=(0,s.useState)(!0),[R,D]=(0,s.useState)([]),[S,A]=(0,s.useState)(!1),{execute:T,ReCAPTCHA:P}=(0,d.Vq)(),I=i?i.replace("/20","/"):null,q=3===R.length&&R.every(e=>1===(0,w.z)(Date.parse(e),(0,y.W)(new Date,{days:-7})));(0,s.useEffect)(()=>{(()=>{C(this,void 0,void 0,function*(){N(yield(0,_.gf)())})})()},[]);const B=document.querySelector("#edit-form");(0,s.useEffect)(()=>{E&&B&&(b("#edit-form"),M(!1))},[b,B,E]),(0,s.useEffect)(()=>{(()=>{C(this,void 0,void 0,function*(){D(yield(0,_.sF)()),A(!0)})})()},[]);const O=t=>C(this,void 0,void 0,function*(){f("");const{nonce:n}=t;try{const t=yield F.mutateAsync({token:e,nonce:n}),{status:o=""}=t;"success"===o?(a(""),u(e),h((0,c.__)("Success! Your credit card has been updated.","nypost")),(0,_.hC)(),b(-1/0)):(f((0,c.__)("There was a problem updating your credit card. Please try again.","nypost")),b(-1/0))}catch(e){a(""),f(e.message),b(-1/0)}});return j?S&&q?(0,o.jsxs)("p",{children:["It looks like youâve recently changed your payment information. To protect your account, another change cannot be made at this time. Please try again 7 days after your last update. If you have any questions, please contact Post Sports+ customer service at:Â ",(0,o.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}):(0,o.jsxs)("div",{id:"edit-form",className:"pay-by-card grid-container-responsive payment-method__edit-form m-top p-top b-top",children:[(0,o.jsx)("h4",{className:"sub-heading--semi",children:(0,c.__)("Edit credit card","nypost")}),(0,o.jsx)("div",{className:"input-container input-container--submit grid-container",children:(0,o.jsxs)("div",{className:"braintree-form-container grid-col grid-col-10",children:[(0,o.jsx)(P,{}),(0,o.jsxs)(k.Braintree,{className:"braintree-form",authorization:j,onAuthorizationSuccess:g.onAuthorizationSuccess,onError:g.handleError,getTokenRef:e=>g.setTokenizeFunc(()=>e),styles:{input:{color:"#585858","font-size":"16px"},":focus":{color:"#585858","font-size":"16px"}},children:[((e="")=>{if(!e)return null;const t={payByCard:{message:e}};return(0,o.jsx)(p.dF,{errors:t})})(v.error),(0,o.jsx)("div",{className:"input-wrapper",children:(0,o.jsx)(k.HostedField,{className:m()({focused:v.focusedFieldName===l.yr.CARD_HOLDER_NAME,"input-error":v.invalidFields.includes(l.KQ[l.yr.CARD_HOLDER_NAME])}),onBlur:g.onFieldBlur,onFocus:g.onFieldFocus,placeholder:(0,c.__)("Name on Card","nypost"),ref:x.cardholderNameField,type:l.yr.CARD_HOLDER_NAME,prefill:t})}),(0,o.jsx)("div",{className:"input-wrapper",children:(0,o.jsx)(k.HostedField,{className:m()({focused:v.focusedFieldName===l.yr.NUMBER,"input-error":v.invalidFields.includes(l.KQ[l.yr.NUMBER])}),onBlur:g.onFieldBlur,onFocus:g.onFieldFocus,ref:x.numberField,type:l.yr.NUMBER,placeholder:r})}),(0,o.jsxs)("div",{className:"input-wrapper flex-direction-row",children:[(0,o.jsx)(k.HostedField,{className:m()({focused:v.focusedFieldName===l.yr.EXPIRATION_DATE,"input-error":v.invalidFields.includes(l.KQ[l.yr.EXPIRATION_DATE])}),onBlur:g.onFieldBlur,onFocus:g.onFieldFocus,placeholder:(0,c.__)("Expiration MM/YY","nypost"),ref:x.expirationDate,type:l.yr.EXPIRATION_DATE,prefill:I}),(0,o.jsx)(k.HostedField,{className:m()({focused:v.focusedFieldName===l.yr.CVV,"input-error":v.invalidFields.includes(l.KQ[l.yr.CVV])}),onBlur:g.onFieldBlur,onFocus:g.onFieldFocus,placeholder:(0,c.__)("CVV","nypost"),ref:x.cvvField,type:l.yr.CVV})]}),(0,o.jsx)("div",{className:"input-wrapper",children:(0,o.jsx)(k.HostedField,{className:m()({focused:v.focusedFieldName===l.yr.POSTAL_CODE,"input-error":v.invalidFields.includes(l.KQ[l.yr.POSTAL_CODE])}),onBlur:g.onFieldBlur,onFocus:g.onFieldFocus,placeholder:(0,c.__)("Zip Code","nypost"),ref:x.postalCodeField,type:l.yr.POSTAL_CODE,prefill:n,minlength:5})})]}),(0,o.jsxs)("div",{id:"edit-form",className:"input-container input-container--submit",children:[(0,o.jsx)("button",{className:"button button--solid button--solid--alt","data-testid":"editupdate",type:"submit",onClick:()=>C(this,void 0,void 0,function*(){try{yield T()}catch(e){return void g.handleError(e)}v.tokenize().then(e=>{g.setNonce(e.nonce),O({nonce:e.nonce,error:""})}).catch(e=>{const{message:t}=e;g.handleError(e),f&&"function"==typeof f&&(f(t),b(-1/0))})}),children:(0,c.__)("Update","nypost")}),(0,o.jsx)("button",{className:"button button--secondary",type:"button","data-testid":"editcancel",onClick:()=>{a(""),f("")},children:(0,c.__)("Cancel","nypost")})]})]})})]}):(0,o.jsx)(p.Ip,{})}
1M.propTypes={method:r().shape({card_type:r().string,last_4:r().string,default:r().bool,token:r().string,card_holder_name:r().string,zipcode:r().string,expiration_date:r().string,card_number_masked:r().string}).isRequired,setMethodFunction:r().func.isRequired,updateFunction:r().func.isRequired,setSuccessFunction:r().func.isRequired,setErrorFunction:r().func.isRequired,scrollToFunction:r().func.isRequired};var R=n(8690),D=n(3127),S=n(8862);const A=({refetchMethodsFunction:e,setSuccessFunction:t,setErrorFunction:n})=>{const{state:i={}}=(0,R.zy)(),{visible:r,setVisible:a}=(0,p.Yc)(),{setError:u}=(0,d.MM)(),{showAddCardForm:h=!1}=i||{},{state:{user:{sessionId:m="",trackingId:y=""}={}}={}}=(0,d.rR)(),{dispatch:f,state:{data:{activeSubscription:{plan:{id:b=""}={}}={},subscriptions:v=[],subscriptionStatus:g=l.dH.NONE}={},plans:x=[]}={}}=(0,d.QW)(),{hasHomeDelivery:F}=(0,d.TM)(),{setDefaultPaymentMethod:j}=(0,d.XL)();(0,s.useEffect)(()=>{h&&a(!0)},[h]);const{plan_id:N=!1,id:E=null}=(0,S.ko)(v).shift()||{},k=(0,S.gD)(g)||N||F(),w=(0,S.Md)(N||b,x);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.xp,{children:(0,o.jsx)("button",{className:"button add-payment-method",onClick:()=>a(!r),type:"button",children:(0,c.__)("Add another payment method","nypost")})}),(0,o.jsxs)(p.rh,{children:[(0,o.jsx)("div",{id:"add-new-payment-method",children:(0,o.jsx)(p.kn,{headingText:(0,c.__)("Add new credit card","nypost"),submitButtonText:(0,c.__)("Add Card","nypost"),handleCancel:()=>a(!1),handleSuccess:o=>{return s=void 0,i=[o],d=function*({token:o}){a(!1);const s=yield j.mutateAsync({token:o,subscriptionId:E});if(yield e(),s)if(N)if(yield(0,_.MZ)({sessionId:m,trackingId:y,subscriptionId:E})){t((0,c.__)("Success! Your subscription was restarted.","nypost"));const e=yield(0,_.X4)(),{activeSubscription:n,status:o}=(0,S.UF)(e);f((0,D.yS)({activeSubscription:n,subscriptions:e,subscriptionStatus:o}))}else n((0,c.__)("There was an error restarting your subscription.","nypost"));else t((0,c.__)("Success! Your credit card has been added.","nypost"));else n((0,c.__)("There was an error adding your credit card.","nypost"))},new((r=void 0)||(r=Promise))(function(e,t){function n(e){try{c(d.next(e))}catch(e){t(e)}}function o(e){try{c(d.throw(e))}catch(e){t(e)}}function c(t){var s;t.done?e(t.value):(s=t.value,s instanceof r?s:new r(function(e){e(s)})).then(n,o)}c((d=d.apply(s,i||[])).next())});var s,i,r,d},handleError:e=>u(e.error)})}),k&&w?(0,o.jsx)("p",{className:"billing-confirmation-text",children:w.billingConfirmText((0,c.__)("ADD CARD","nypost"))}):null]})]})};A.propTypes={refetchMethodsFunction:r().func.isRequired,setErrorFunction:r().func.isRequired,setSuccessFunction:r().func.isRequired};const T=({showAdd:e=!0,showButtons:t=!0,showExpiringWarning:n=!1})=>{const[i,r]=(0,s.useState)(""),h=(0,s.useRef)(document.documentElement),m=(0,s.useRef)(document.querySelector(".membership-dropdown__container")),{error:y,renderError:f,setError:_}=(0,d.MM)(),b=(0,a.o)(l.zZ),{dropdownOpen:F}=(0,d.WP)(),{state:{user:{sessionId:j,trackingId:N}}}=(0,d.rR)(),{state:{data:{activeSubscription:k={}}={}}}=(0,d.QW)(),{id:w=null}=k||{},{operations:C,state:R}=(0,d.mu)(),D=R.methods.map(e=>(0,o.jsx)(E,{method:e,subscriptionId:w,toggleDeleteFunction:C.setDeleteMethod,toggleEditFunction:C.setEditMethod,selectDefaultFunction:C.selectDefaultPaymentMethod,showButtons:t,showExpiringWarning:n},e.token)),{scrollTo:S}=(0,u.Ay)({ref:F?m:h,speed:100,direction:"y"}),T=Object.keys(R.deleteMethod).length>0,P=Object.keys(R.editMethod).length>0;return(0,s.useEffect)(()=>{T&&S("#remove-confirmation")},[T]),(0,s.useEffect)(()=>{y?S(".error"):i&&S(".alert-bar")},[y,i]),(0,o.jsxs)("div",{className:"payment-method-selector--wrap",children:[""!==i&&(0,o.jsx)(p.nS,{message:i}),y?f(y):null,R.methodsFetched?(0,o.jsxs)(p._A,{children:[(0,o.jsx)("fieldset",{className:"payment-method-selector",children:D}),T||P||!e?null:(0,o.jsx)(g.wn,{children:(0,o.jsx)(A,{refetchMethodsFunction:C.refetchPaymentMethods,setErrorFunction:_,setSuccessFunction:r})})]}):(0,o.jsx)(p.Ip,{}),T&&(0,o.jsx)(x,{method:R.deleteMethod,sessionId:j,trackingId:N,nonce:nypMembership.nonce,setMethodFunction:C.setDeleteMethod,removeFunction:R.removeMethod,setSuccessFunction:r,setErrorFunction:_},R.deleteMethod.token||""),P?b?(0,o.jsx)(v,{method:R.editMethod,onSubmitSuccess:({token:e})=>{C.setEditMethod(""),R.updateMethod(e),r((0,c.__)("Success! Your credit card has been updated.","nypost")),S(0)},onSubmitError:({error:e,shouldCloseForm:t})=>{t&&C.setEditMethod(""),_(e||(0,c.__)("There was a problem updating your credit card. Please try again.","nypost")),S(0)},onCancel:()=>{C.setEditMethod(""),_("")}},R.editMethod.token||""):(0,o.jsx)(M,{method:R.editMethod,sessionId:j,trackingId:N,nonce:nypMembership.nonce,setMethodFunction:C.setEditMethod,updateFunction:R.updateMethod,setSuccessFunction:r,setErrorFunction:_,scrollToFunction:S},R.editMethod.token||""):null]})};T.propTypes={showAdd:r().bool,showButtons:r().bool,showExpiringWarning:r().bool}},2906:function(e,t,n){n.d(t,{o:function(){return s}});var o=n(9150);const s=e=>{const{gtf:{featureFlags:t=[]}={}}=window;return t.includes(o(e))||t.includes(e)}}}]); 2//# sourceMappingURL=98.2dd572949043ae53053c.bundle.min.js.map
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.