1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4d6d37d3-1d85-4c41-bd64-a42d6c523de2",e._sentryDebugIdIdentifier="sentry-dbid-4d6d37d3-1d85-4c41-bd64-a42d6c523de2")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9403],{12953:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>E});var a=i(37876),n=i(14232),r=i(532),c=i(81318),o=i(97342),l=i(32565),d=i(11999),s=i(28751),u=i(65510),m=i(1502),p=i(20982),g=i(36190),f=i(20366),y=i(53965),h=i(58209),b=i(69034),x=i(19818),v=i(80425),S=i(39742),C=i(40967),P=i(28516);let w=e=>{let{charityId:t,charity:i,refresh:r,paymentGateways:s,country:m}=e,[p,x]=(0,n.useState)(),[v,S]=(0,n.useState)(),[C,w]=(0,n.useState)(),[_,E]=(0,n.useState)(),{setUpPayment:L,stripeError:k,resetPaymentAttempt:A}=(0,P.d)({paymentGateways:s,paymentAccount:y.PaymentAccount.Operating,trackPaymentAttempt:!0,paymentAttemptScope:t,onSubmit:e=>{j(e)}}),I=async e=>{x(!0),e.paymentType===y.PaymentType.CreditCard?await L(e):j(e)},j=async e=>{var i,a,n;S(void 0);let c=e.membershipType===h.MembershipPackageType.Custom,o=(null!=(n=e.creditCardInfo)?n:{}).stripePaymentMethodId,l=await (0,g.of)(t,{...e,membershipValidFrom:c?null==(i=e.membershipValidFrom)?void 0:i.toString():void 0,membershipValidTo:c?null==(a=e.membershipValidTo)?void 0:a.toString():void 0,membershipFee:c?e.membershipFee:void 0,taxAmount:c?e.taxAmount:void 0,promotion:c?e.promotion:void 0,useStoredCreditCard:e.paymentType===y.PaymentType.CreditCard?e.useStoredCreditCard:void 0,creditCardInfo:e.paymentType===y.PaymentType.CreditCard?{...e.creditCardInfo,cardType:e.creditCardInfo.cardType,saveCard:!1}:void 0,...o?{stripePaymentMethodId:o}:{}});if(A(),(0,b.bJ)(l)){let e=(0,f.PP)(l,"Error updating membership");x(!1),S(e),E(void 0)}else{w(!C),x(!1),S(void 0);let t="Membership successfully updated";if(e.membershipType===h.MembershipPackageType.Custom&&e.membershipValidFrom&&e.membershipValidTo){let i=new Date(e.membershipValidFrom),a=new Date(e.membershipValidTo);t="Membership successfully updated. Valid from ".concat(i.toLocaleDateString()," to ").concat(a.toLocaleDateString())}E(t),await r(),w(!C)}};return(0,a.jsx)(o.l,{schema:d.wQ,defaultData:{...d.g2,country:m},onAfterValidate:()=>{},start:"payment-registration",onSubmit:I,children:e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.f1,{formikProps:e,headerOffset:200}),(0,a.jsx)(l.pn,{id:"payment-registration",label:"",children:(0,a.jsx)(o.l.Slide,{id:"payment-registration",fields:["membershipValidTo","membershipValidFrom","adminNotes","transactionNumber","amount","creditCardInfo","membershipFee","taxAmount","membershipTypeId"],submit:()=>!0,children:(0,a.jsx)(u.A,{charityId:t,charity:i,saved:C,modalOpen:p,error:v,successMessage:_,country:m,stripeError:k})})})]})})},_=e=>{var t;let{charityId:i}
1=e,[c,o]=(0,n.useState)(),[l,d]=(0,n.useState)(),[s,u]=(0,n.useState)(),p=async()=>{d(!0),o(await (0,g.uO)(i)),d(!1)},f=async()=>{u((await (0,g.WQ)()).paymentGateways)};(0,n.useEffect)(()=>(m.A.loadEcryptScript(),p(),f(),function(){m.A.unLoadEcryptScript()}),[]);let h=null==(t=(0,n.useContext)(x.f5).getCountry())?void 0:t.code,b=(0,C.M)(s,h,y.PaymentAccount.Operating),P=(0,C.i)(b);return(0,a.jsx)(r.yB,{title:"Charity Payment Registration",adminArea:"backoffice",loading:l,backAction:{content:"Charity Settings",url:"/admin/backoffice/charity-settings/".concat(i,"/edit")},children:(0,a.jsx)(v.P,{sectioned:!0,children:(0,a.jsx)(S.S8,{stripe:P,children:(0,a.jsx)(w,{charityId:i,charity:c,refresh:p,paymentGateways:s,country:h})})})})};_.getInitialProps=async e=>({charityId:e.query.id});let E=(0,p.Y)(s.x.BackOffice_ViewCharities)(_)},15598:(e,t,i)=>{"use strict";i.d(t,{u:()=>x});var a=i(14232),n=i(8484),r=i(65472),c=i(59151),o={LegacyCard:"Polaris-LegacyCard",Section:"Polaris-LegacyCard__Section",subdued:"Polaris-LegacyCard--subdued","Section-hideOnPrint":"Polaris-LegacyCard__Section--hideOnPrint",hideOnPrint:"Polaris-LegacyCard--hideOnPrint",Header:"Polaris-LegacyCard__Header","Section-fullWidth":"Polaris-LegacyCard__Section--fullWidth","Section-flush":"Polaris-LegacyCard__Section--flush","Section-subdued":"Polaris-LegacyCard__Section--subdued",SectionHeader:"Polaris-LegacyCard__SectionHeader",Subsection:"Polaris-LegacyCard__Subsection",Footer:"Polaris-LegacyCard__Footer",LeftJustified:"Polaris-LegacyCard__LeftJustified",FirstSectionPadding:"Polaris-LegacyCard__FirstSectionPadding",LastSectionPadding:"Polaris-LegacyCard__LastSectionPadding"},l=i(75430),d=i(77521),s=i(89219),u=i(8949);function m(e){let{children:t,title:i,actions:n}=e,r=n?a.createElement(d.e,null,(0,l.G)(n,{variant:"plain"})):null,c=(0,a.isValidElement)(i)?i:a.createElement(u.E,{variant:"headingSm",as:"h2"},i),m=r||t?a.createElement(s.o,{wrap:!1,gap:"200",align:"space-between",blockAlign:"center"},c,a.createElement(s.o,{wrap:!1,gap:"400",blockAlign:"center"},r,t)):c;return a.createElement("div",{className:o.Header},m)}var p=i(57464);function g(e){let{children:t,title:i,subdued:r,flush:c,fullWidth:s,actions:m,hideOnPrint:g}=e,f=(0,n.xW)(o.Section,c&&o["Section-flush"],r&&o["Section-subdued"],s&&o["Section-fullWidth"],g&&o["Section-hideOnPrint"]),y=m?a.createElement(d.e,null,(0,l.G)(m,{variant:"plain"})):null,h="string"==typeof i?a.createElement(u.E,{variant:"headingSm",as:"h3",fontWeight:"medium"},i):i,b=h||y?a.createElement("div",{className:o.SectionHeader},y?a.createElement(p.W,{alignment:"baseline"},a.createElement(p.W.Item,{fill:!0},h),y):h):null;return a.createElement("div",{className:f},b,t)}var f=i(65565),y=i(77742),h=i(35070),b=i(67409);let x=function(e){let{children:t,hideOnPrint:i,title:s,subdued:u,sectioned:p,actions:x,primaryFooterAction:S,secondaryFooterActions:C,secondaryFooterActionsDisclosureText:P,footerActionAlignment:w="right"}=e,_=(0,f.s)(),{value:E,toggle:L}=(0,r.e)(!1),k=function(){let e=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let t,i,a=e.current;if(a){let e=()=>{var e,n,r;let c;v(t,"top",!1),v(i,"bottom",!1);let l=a.querySelectorAll(".".concat(o.Section,", .").concat(o.Header,", .").concat(o.Footer));if(!(null==l?void 0:l.length))return;let d=l[0],s=(c=(r=l)[0],r.forEach(e=>{c.contains(e)||(c=e)}),c);(null==(e=a.firstChild)?void 0:e.contains(d))&&v(t=d,"top",!0),(null==(n=a.lastChild)?void 0:n.contains(s))&&v(i=s,"bottom",!0)};e();let n=new MutationObserver(e);return n.observe(a,{childList:!0,subtree:!0}),()=>{v(t,"top",!1),v(i,"bottom",!1),n.disconnect()}}},[]),e}(),A=(0,n.xW)(o.LegacyCard,u&&o.subdued,i&&o.hideOnPrint),I=s||x?a.createElement(m,{actions:x,title:s}):null,j=p?a.createElement(g,null,t):t,T=S?(0,l.x)(S,{variant:"primary"}):null,N=null;C&&C.length&&(N=1===C.length?(0,l.x)(C[0]):a.createElement(a.Fragment,null,a.createElement(y.A,{active:E,activator:a.createElement(h.$,{disclosure:!0,onClick:L},P||_.translate("Polaris.Common.more")),onClose:L},a.createElement(b.l,{items:C}))));let F=T||N?a.createElement("div",{className:(0,n.xW)(o.Footer,"left"===w&&o.LeftJustified)},"right"===w?a.createElement(d.e,null,N,T):a.createElement(d.e,null,T,N)):null;return a.createElement(c.O.Provider,{value:!0},a.createElement("div",{className:A,ref:k},I,j,F))};function v(e,t,i){if(!(!e||e.className.includes(o["Section-flush"])))switch(t){case"top":e.classList.toggle(o.FirstSectionPadding,i);return;case"bottom":e.classList.toggle(o.LastSectionPadding,i)}}x.Header=m,x.Section=g,x.Subsection=function(e){let{children:t}=e;return a.createElement("div",{className:o.Subsection},t)}},26195:(e,t,i)=>{"use strict";i.d(t,{N:()=>r,x:()=>n});var a=i(80992);function n(e){return"\n font-size: ".concat({extraSmall:.625,small:1.2/1.6,medium:1.4/1.6,large:1.125,extraLarge:2.4/1.6}[e],"rem;\n ")}function r(e){let t={positive:"color:".concat((0,a.y)("green","dark"),";"),negative:"color:".concat((0,a.y)("red","dark"),";"),strong:"font-weight: 600;",subdued:"opacity:0.5;"}[e];return"\n ".concat(t,";\n ")}},41729:(e,t,i)=>{"use strict";i.d(t,{V:()=>n});var a=i(80992);function n(e){return({base:"3px",large:"6px"})[e]}(0,a.y)("sky"),(0,a.y)("sky","dark")},45991:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var a=i(37876);i(14232);var n=i(44264),r=i(61436),c=i(67299),o=i(64850),l=i(41943),d=i(56362);let s=n.Ay.div.withConfig({componentId:"sc-daf0229e-0"})(["display:flex;justify-content:space-between;background:",";"],(0,r.yW)("white")),u=n.Ay.div.withConfig({componentId:"sc-daf0229e-1"})(["flex:0 1 90%;padding:",";display:flex;justify-content:center;align-items:center;flex-wrap:wrap;"],(0,r.YK)("extra-tight")),m=n.Ay.div.withConfig({componentId:"sc-daf0229e-2"})(["flex:0 1 5%;padding:",";text-align:right;"],(0,r.YK)("tight")),p=n.Ay.div.withConfig({componentId:"sc-daf0229e-3"})(["flex:0 1 5%;padding:",";"],(0,r.YK)("tight")),g=n.Ay.div.withConfig({componentId:"sc-daf0229e-4"})(["",""],e=>{let{$selected:t}=e;return(0,n.AH)(["display:flex;flex-direction:column;align-items:center;margin:0.7rem 0.7rem;@media (max-width:","){& > *{display:none;}
1height:15px;width:10px;background-color:",";border-radius:50%;display:inline-block;}"],c.f.tabletLandscape+"px",t?(0,r.yW)("primary"):"#e9e9e9")}),f=n.Ay.span.withConfig({componentId:"sc-daf0229e-5"})([""," ",";position:relative;margin-bottom:0.35rem;"],e=>{let{$selected:t}=e;return t?"\n ".concat((0,r.xP)("extraLarge"),";\n color: #0b1f59;\n "):"\n ".concat((0,r.xP)("large"),";\n color: #e9e9e9;\n ")},(0,r.N9)("strong")),y=n.Ay.span.withConfig({componentId:"sc-daf0229e-6"})(["background-color:",";height:",";width:150px;"],e=>e.$selected?(0,r.yW)("primary"):"#e9e9e9",(0,r.YK)("extra-tight"));function h(e){let{stepList:t,currentStep:i,onNavigate:n,hideButtons:r,hideLeftButton:c,hideRightButton:h,onClickBack:b}=e;return(0,a.jsxs)(s,{children:[!r&&!c&&(0,a.jsx)(p,{children:(0,a.jsx)(o.A,{primary:!0,icon:l.S,direction:"left",onClick:b,children:"Back"})}),(0,a.jsx)(u,{children:t.map(e=>{let{id:t,label:n}=e,r=i===t;return(0,a.jsxs)(g,{$selected:r,children:[(0,a.jsx)(f,{$selected:r,children:n}),(0,a.jsx)(y,{$selected:r})]},t)})}),!r&&!h&&(0,a.jsx)(m,{children:(0,a.jsx)(o.A,{primary:!0,icon:d.S,direction:"right",onClick:n,children:"Next"})})]})}},50089:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/backoffice/charity/[id]/edit/registration",function(){return i(12953)}])},61436:(e,t,i)=>{"use strict";i.d(t,{Vq:()=>a.V,yW:()=>n.y,p0:()=>o,cz:()=>c,r7:()=>l,YK:()=>r.Y,xP:()=>d.x,N9:()=>d.N});var a=i(41729),n=i(80992),r=i(84578);function c(e){return({base:"cubic-bezier(0.64, 0, 0.35, 1)",in:"cubic-bezier(0.36, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.42, 1)",excite:"cubic-bezier(0.18, 0.67, 0.6, 1.22)",overshoot:"cubic-bezier(0.07, 0.28, 0.32, 1.22)",anticipate:"cubic-bezier(0.38, -0.4, 0.88, 0.65)"})[e]}function o(e){return({fast:100,base:200,slow:300,slower:400,slowest:500})[e]+"ms"}function l(e){return({faint:"0 1px 0 0 rgba(22, 29, 37, 0.05)",base:"0 0 0 1px rgba(63, 63, 68, 0.05), 0 1px 3px 0 rgba(63, 63, 68, 0.15)",deep:"0 0 0 1px rgba(6, 44, 82, 0.1), 0 2px 16px rgba(33, 43, 54, 0.08)",layer:"0 31px 41px 0 rgba(32, 42, 53, 0.2), 0 2px 16px 0 rgba(32, 42, 54, 0.08)",transparent:"0 0 0 0 transparent"})[e]}var d=i(26195)},64850:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var a=i(37876);i(14232);var n=i(35070);let r=e=>{let{children:t,icon:i,onClick:r,...c}=e;return(0,a.jsx)(n.$,{external:!0,variant:"primary",size:"large",fullWidth:!0,icon:i,onClick:r,...c,children:t})}},84578:(e,t,i)=>{"use strict";function a(e){let t={none:0,"extra-tight":.625,tight:1.25,base:2.5,loose:3.125,"extra-loose":5}[e];return 0===t?0:"".concat(t,"rem")}i.d(t,{Y:()=>a})}},e=>{e.O(0,[2026,9879,3716,6494,6960,2120,7930,1286,7083,766,4905,6265,8777,3600,6248,4974,8794,6190,347,949,636,6593,8792],()=>e(e.s=50089)),_N_E=e.O()}]); 2//# sourceMappingURL=registration-5cd094bd71a3ee71.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.