PageSourceSearch

https://online.hoaresbank.co.uk/portalserver/v2/static/js/595.5e8e9499.chunk.js

js hoaresbank.co.uk collected 2026-10-01 12:01:35 UTC 28,120 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkchc_online_banking_app=self.webpackChunkchc_online_banking_app||[]).push([[595],{85595:function(e,i,n){n.r(i),n.d(i,{default:function(){return xe}});var a=n(70885),r=n(34706),t=n(79730),c=n(1413),s=n(17485),o=n(44975),d=n(76027),l=n(58562),u=n(44184),f=n(97424),m=n(20608),y=n(18088),b=n(31970),h=n(20330),v=n(84819),x=n(1658),p=n(123),j=n(162),_=n(10161),N=function(e){var i=e.beneficiary,n=e.disabled,t=e.onCancel,c=e.onSubmit,s=(0,r.useState)(i.name),o=(0,a.Z)(s,2),d=o[0],l=o[1],u=(0,r.useState)(i.multiLineReference.line1),f=(0,a.Z)(u,2),m=f[0],y=f[1];return(0,_.jsxs)("div",{className:"BeneficiaryInformationEdit","data-testid":"beneficiary-information-edit",children:[(0,_.jsxs)("div",{children:["Name",(0,_.jsx)(p.Z,{value:d,onChange:l,pattern:j.sG.PATTERN,maxLength:j.sG.MAX,testId:"beneficiary-information-edit-name-input",className:"BeneficiaryInformationEdit__input",disabled:n,ariaLabel:"Name"})]}),(0,_.jsxs)("div",{className:"BeneficiaryInformationEdit__account",children:[(0,_.jsx)("div",{children:"Account number "}),(0,_.jsxs)("div",{children:[i.accountIdentification.arrangementId," |",i.accountIdentification.sortCode]})]}),(0,_.jsxs)("div",{children:["Reference",(0,_.jsx)(p.Z,{value:m,onChange:y,pattern:j.Tu.PATTERN,maxLength:j.Tu.MAX,testId:"beneficiary-information-edit-reference-input",className:"BeneficiaryInformationEdit__input",disabled:n,ariaLabel:"Reference","aria-describedby":"reference-format"}),(0,_.jsx)("p",{id:"reference-format",className:"sr-only",children:"The beneficiary reference can include letters, numbers, spaces, and the following characters: comma, period, slash, colon, parentheses, ampersand, question mark, plus, and minus. It can be up to 18 characters long."})]}),(0,_.jsxs)("div",{className:"BeneficiaryInformationEdit__buttons",children:[(0,_.jsx)(h.Z,{variant:"secondary",onClick:t,testId:"beneficiary-information-edit-cancel-button",children:"Cancel"}),(0,_.jsx)(h.Z,{variant:"primary",onClick:function(){return c(d,m)},testId:"beneficiary-information-edit-save-button",className:"BeneficiaryInformationEdit__buttons-save",disabled:n,children:"Save"})]})]})},I=n(18110),g=n(72440),B=function(e){m.Z.showModal({header:"Are you sure you want to delete this beneficiary?",size:"small",isCancelModal:!0,icon:f.RLE,footer:(0,_.jsx)(x.Z,{onDeclineClick:m.Z.hideModal,onAcceptClick:function(){return function(e){o.Z.deleteBeneficiary(e),m.Z.hideModal()}(e)}})})},C=function(e){var i=e.beneficiary,n=(0,r.useState)(!1),t=(0,a.Z)(n,2),s=t[0],d=t[1];(0,r.useEffect)((function(){d(!1)}),[i]);var l=(0,r.useRef)(null),u=function e(i){"Tab"===i.key&&l.current&&(l.current.focus(),document.removeEventListener("keydown",e))};(0,r.useEffect)((function(){return l.current&&document.addEventListener("keydown",u),function(){document.removeEventListener("keydown",u)}}),[l.current,i]);var f=function(){return(0,_.jsx)(h.Z,{variant:"primary",onClick:function(){return function(e){var i={arrangementId:e.id,name:e.name,accountNumber:e.accountIdentification.iban,sortCode:e.accountIdentification.sortCode||"",reference:e.reference,multiLineReference:e.multiLineReference,cop:e.cop};switch(e.type){case g.td.TPP:return y.Z.makePayment(i);case g.td.INTERNATIONAL:return b.DP((0,c.Z)((0,c.Z)({},i),{},{routing:e.routing,holderAddress:e.address,bankDetails:e.bank}));default:return}}(i)},className:"BeneficiaryInformation__buttons-payment",testId:"beneficiary-create-payment-button",children:"Make payment"})},m=function(){var e,n;return(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{className:"BeneficiaryInformation__main-account",children:i.accountIdentification.arrangementId}),(null===(e=i.bank)||void 0===e?void 0:e.bic)&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(v.Z,{}),(0,_.jsx)("div",{className:"BeneficiaryInformation__main-swift",children:"SWIFT code (BIC)"}),(0,_.jsx)("div",{className:"BeneficiaryInformation__main-swift-content",children:null===(n=i.bank)||void 0===n?void 0:n.bic})]})]})};return(0,_.jsx)("div",{className:"BeneficiaryInformation","data-testid":"beneficiary-information",ref:l,children:s?(0,_.jsx)(N,{beneficiary:i,onCancel:function(){d(!1)},onSubmit:function(e,n){o.Z.updateBeneficiary((0,c.Z)((0,c.Z)({},i),{},{name:e,multiLineReference:(0,c.Z)((0,c.Z)({},i.multiLineReference),{},{line1:n})}))}}):function(){var e,n;return(0,_.jsxs)("div",{className:"BeneficiaryInformation__main",children:[(0,_.jsx)("div",{className:"BeneficiaryInformation__main-name",children:i.name}),"INTERNATIONAL"===i.type?m():(0,_.jsxs)("div",{className:"BeneficiaryInformation__main-account",children:[(0,_.jsx)("div",{"data-testid":"account-number",children:i.accountIdentification.arrangementId}),(0,_.jsx)("div",{className:"BeneficiaryInformation__main-account-divider",children:"|"}),(0,_.jsx)("div",{"data-testid":"sort-code",children:i.accountIdentification.sortCode})]}),i.reference&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(v.Z,{}),(0,_.jsx)("div",{className:"BeneficiaryInformation__main-reference",children:"Reference"}),(0,_.jsx)("div",{className:"BeneficiaryInformation__main-reference-content",children:i.reference})]}),"INTERNATIONAL"===i.type&&(null===(e=i.bank)||void 0===e?void 0:e.bankAddress.country)&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(v.Z,{}),(0,_.jsx)("div",{className:"BeneficiaryInformation__main-country",children:"Country"}),(0,_.jsx)("div",{className:"BeneficiaryInformation__main-country-content",children:null===(n=i.bank)||void 0===n?void 0:n.bankAddress.country})]}),(0,_.jsxs)("div",{className:"BeneficiaryInformation__buttons",children:[(0,_.jsx)(h.Z,{variant:"secondary",onClick:function(){return B(i.id)}
1,testId:"beneficiary-delete-button",id:"beneficiary-delete-button-".concat(i.id),children:"Delete"}),(0,I.Gt)(i.type)?(0,_.jsx)(h.Z,{variant:"secondary",onClick:function(){return d(!0)},className:"BeneficiaryInformation__buttons-edit",testId:"beneficiary-details-edit-button",children:"Edit"}):f()]})]})}()})},w=n(89312),Z=n(49007),k=function(e,i){m.Z.showModal({header:"Are you sure you want to delete this beneficiary group?",size:"small",isCancelModal:!0,icon:f.RLE,footer:(0,_.jsx)(x.Z,{onDeclineClick:m.Z.hideModal,onAcceptClick:function(){return function(e,i){o.Z.deleteBeneficiaryGroup(e,i),m.Z.hideModal()}(e,i)}})})},E=function(e){var i=e.group,n=i.groupName,a=i.groupId,t=i.groupType,c=i.beneficiaries,s=(0,r.useRef)(null),d=function e(i){"Tab"===i.key&&s.current&&(s.current.focus(),document.removeEventListener("keydown",e))};return(0,r.useEffect)((function(){return s.current&&document.addEventListener("keydown",d),function(){document.removeEventListener("keydown",d)}}),[s.current,a]),(0,_.jsxs)("div",{className:"BeneficiaryGroupInformation","data-testid":"beneficiary-group-information",ref:s,children:[(0,_.jsx)("div",{className:"BeneficiaryGroupInformation__group","data-testid":"beneficiaries-group-name",children:n}),(0,_.jsx)(v.Z,{}),c.map((function(e){var i=e.id,n=e.name,a=e.accountIdentification,r=e.reference;return(0,_.jsxs)("div",{className:"BeneficiaryGroupInformation__beneficiary",children:[(0,_.jsx)("div",{className:"BeneficiaryGroupInformation__beneficiary-name",children:n}),(0,_.jsxs)("div",{className:"BeneficiaryGroupInformation__beneficiary-account",children:[(0,_.jsx)("div",{"data-testid":"account-number",children:a.arrangementId}),(0,_.jsx)("div",{className:"BeneficiaryGroupInformation__beneficiary-account-divider",children:"|"}),(0,_.jsx)("div",{"data-testid":"sort-code",children:a.sortCode})]}),(0,_.jsx)("div",{className:"BeneficiaryGroupInformation__beneficiary-reference",children:r}),(0,_.jsx)(v.Z,{})]},i)})),(0,_.jsxs)("div",{className:"BeneficiaryGroupInformation__buttons",children:[(0,_.jsx)(h.Z,{variant:"secondary",testId:"beneficiaries-delete-group-button",id:"beneficiaries-delete-group-button-".concat(a),onClick:function(){return k(a,t)},children:"Delete"}),(0,_.jsx)(h.Z,{variant:"secondary",className:"BeneficiaryGroupInformation__buttons-edit",testId:"beneficiaries-edit-group-button",onClick:function(){o.Z.editGroup(a,n,c,t)},children:"Edit"}),(0,_.jsx)(h.Z,{variant:"primary",testId:"beneficiaries-group-create-payment-button",onClick:function(){w.ZP.makePayment(c,Z.hv[t])},children:"Make payment"})]})]})},T=n(17996),R=n(23399),L=n.n(R),S=function(e){var i=e.beneficiary,n=e.onClick,a=e.isSelected,t=L()("BeneficiaryListItem",{"BeneficiaryListItem--selected":a}),c=(0,r.useRef)(null);return(0,_.jsxs)("div",{className:t,onClick:n,"data-testid":"beneficiary-list-item",tabIndex:1,ref:c,onKeyDown:function(e){"Enter"===e.key&&c.current&&c.current.click()},children:[(0,_.jsx)("div",{className:"BeneficiaryListItem__text","data-testid":"beneficiary-list-item-name-".concat(g.td[i.type]),children:i.name}),(0,_.jsx)("div",{className:"BeneficiaryListItem__text","data-testid":"beneficiary-list-item-reference-".concat(g.td[i.type]),children:i.reference})]})},A=n(23588),G=function(e){var i=e.group,n=e.onClick,a=e.isSelected,t=L()("BeneficiaryListItem",{"BeneficiaryListItem--selected":a}),c=(0,r.useRef)(null);return(0,_.jsx)("div",{onClick:n,className:t,"data-testid":"beneficiaries-group",tabIndex:1,onKeyDown:function(e){"Enter"===e.key&&c.current&&c.current.click()},ref:c,children:i.groupName})},P=n(31979),F=[{name:"Groups",testId:"groups-tab"},{name:"Beneficiaries",testId:"beneficiaries-tab"}],M=function(e){var i=e.beneficiaries,n=e.groups,a=e.onCreateGroup,r=e.onItemClick,t=e.onCreateBeneficiary,o=e.setTabIndexes,d=e.tabIndexes,l=e.selected;if((0,s.v9)(P.lR)===g.$B.FETCH_BENEFICIARIES)return(0,_.jsx)(T.Z,{});var f=function(e,n){return null!==i&&void 0!==i&&i.length?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:n?"BeneficiaryList__container BeneficiaryList__container-extratab":"BeneficiaryList__container",children:i.map((function(e){return(0,_.jsx)(S,{beneficiary:e,onClick:function(){return r(e)},isSelected:!(!l||l.id!==e.id)},e.id)}))}),e]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(A.Z,{content:"There are no beneficiaries to display."}),e]})};return(0,_.jsx)("div",{className:"BeneficiaryList",children:n?(0,_.jsxs)(u.Z,{tabList:F,selectedTabIndex:null===d||void 0===d?void 0:d.subTabIndex,onSelect:function(e){o&&d&&o((0,c.Z)((0,c.Z)({},d),{},{subTabIndex:e}))},sub:!0,children:[(0,_.jsxs)(_.Fragment,{children:[null!==n&&void 0!==n&&n.length?(0,_.jsx)("div",{className:"BeneficiaryList__container BeneficiaryList__container-extratab",children:null===n||void 0===n?void 0:n.map((function(e){return(0,_.jsx)(G,{group:e,onClick:function(){return r(e)},isSelected:!(!l||l.groupId!==e.groupId)},e.groupId)}))}):(0,_.jsx)(A.Z,{content:"There are no groups to display."}),(0,_.jsx)("div",{className:"BeneficiaryList__create",children:a&&(0,_.jsx)(h.Z,{variant:"primary",className:"BeneficiaryList__create-button",testId:"benef
1iciaries-create-new-group-button",onClick:a,type:"button",children:"Create new group"})})]}),(0,_.jsx)(_.Fragment,{children:f((0,_.jsx)("div",{className:"BeneficiaryList__create",children:t&&(0,_.jsx)(h.Z,{variant:"primary",className:"BeneficiaryList__create-button",testId:"beneficiaries-create-new-beneficiary-button",onClick:t,type:"button",children:"Create new beneficiary"})}),!0)})]}):f()})},U=n(39190),Y=n(37436),q=n(71277),O=n(73534),D=n(10860),X=n(54622),$=function(e){var i=e.beneficiary,n=e.setBeneficiary,t=e.onSave,d=i.accountNumber,l=i.sortCode,u=i.beneficiaryName,f=i.reference,m=i.beneficiaryType,y=(0,r.useState)(!1),b=(0,a.Z)(y,2),v=b[0],x=b[1],N=(0,r.useRef)(null),I=(0,s.v9)(P.XJ),B=(0,s.v9)(P.lR),C=!!(0,s.v9)(O.G4),w=(0,s.v9)((0,O.c_)("fpEnabledFlag")),Z=(0,s.v9)((0,O.c_)("chapsEnabledFlag")),k=function(){d&&l&&o.Z.fetchAccountLookup({accountNumber:d,sortCode:l})},E=!(0,D.i8)(i)||B===g.$B.FETCHING_ACCOUNT_LOOKUP_FAILURE||!I,T=function e(i){"Tab"===i.key&&N.current&&(N.current.focus(),document.removeEventListener("keydown",e))};return(0,r.useEffect)((function(){return N.current&&document.addEventListener("keydown",T),function(){document.removeEventListener("keydown",T)}}),[N.current]),(0,_.jsxs)("div",{className:"NewBeneficiaryCreate","data-testid":"new-beneficiary-create",tabIndex:-1,ref:N,children:[(0,_.jsx)("h4",{children:(0,_.jsx)("strong",{children:"Beneficiary details"})}),(0,_.jsxs)("div",{className:"NewBeneficiaryCreate__row",children:[(0,_.jsx)("label",{className:"NewBeneficiaryCreate__label",htmlFor:"beneficiary-name",children:"Name"}),(0,_.jsx)(p.Z,{value:u,onChange:function(e){n((0,c.Z)((0,c.Z)({},i),{},{beneficiaryName:e})),x(!1)},pattern:j.sG.PATTERN,maxLength:j.sG.MAX,errorMessages:J,testId:"beneficiary-name-input",className:"NewBeneficiaryCreate__input",placeholder:"Name",shouldMarkAsUntouched:v,required:!0,tabIndex:1,id:"beneficiary-name","aria-describedby":"beneficiary-format"}
1),(0,_.jsx)("p",{id:"beneficiary-format",className:"sr-only",children:"The beneficiary name can include letters, numbers, and the following characters: space, comma, period, slash, colon, parentheses, ampersand, question mark, plus, and minus. It can be up to 70 characters long."})]}),(0,_.jsx)("div",{className:"NewBeneficiaryCreate__row",children:(0,_.jsx)(Y.ZP,{value:d,onChange:function(e){n((0,c.Z)((0,c.Z)({},i),{},{accountNumber:e})),x(!1)},onBlur:k,errorMessages:J,shouldMarkAsUntouched:v,tabIndex:1})}),(0,_.jsx)("div",{className:"NewBeneficiaryCreate__row",children:(0,_.jsx)(q.Z,{value:l,onBlur:k,onChange:function(e){n((0,c.Z)((0,c.Z)({},i),{},{sortCode:e})),x(!1)},errorMessages:J,shouldMarkAsUntouched:v,hasAccountLookup:C,fpEnabled:w,chapsEnabled:Z,tabIndex:1})}),I&&(0,_.jsx)("div",{className:"NewBeneficiaryCreate__row",children:(0,_.jsx)(U.Z,{bankDetails:I})}),(0,_.jsxs)("div",{className:"NewBeneficiaryCreate__row",children:[(0,_.jsx)("label",{className:"NewBeneficiaryCreate__label",htmlFor:"reference",children:"Reference"}),(0,_.jsx)(p.Z,{value:null===f||void 0===f?void 0:f.line1,onChange:function(e){n((0,c.Z)((0,c.Z)({},i),{},{reference:{line1:e}})),x(!1)},pattern:j.Tu.PATTERN,maxLength:j.Tu.MAX,placeholder:"Reference",testId:"create-beneficiary-reference-input",errorMessages:J,className:"NewBeneficiaryCreate__input",ariaLabel:"Reference",tabIndex:1,"aria-describedby":"reference-format",id:"reference"}),(0,_.jsx)("p",{id:"reference-format",className:"sr-only",children:"The beneficiary reference can include letters, numbers, spaces, and the following characters: comma, period, slash, colon, parentheses, ampersand, question mark, plus, and minus. It can be up to 18 characters long."})]}),(0,_.jsxs)("div",{className:"NewBeneficiaryCreate__buttons",children:[(0,_.jsx)(h.Z,{variant:"secondary",onClick:function(){n(ae(m)),o.Z.resetAccountLookup(),x(!0),(0,X.Gd)({type:"com.web.beneficiaryCreateClear",action:"click",section:(null===m||void 0===m?void 0:m.toLowerCase())+"Payments",category:(null===m||void 0===m?void 0:m.toLowerCase())+"Flow"})},className:"NewBeneficiaryCreate__button",testId:"new-beneficiary-cancel-button",type:"button",children:"Clear"}),(0,_.jsx)(h.Z,{variant:"primary",onClick:t,disabled:E,testId:"create-beneficiary-save-button",className:"NewBeneficiaryCreate__button",type:"button",children:"Save"})]})]})},K=n(60070),z={header:"How do I generate a security code?",body:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("p",{children:"In order to retrieve a security code to save a beneficiary, please do the following:"}),(0,_.jsxs)("ul",{children:[(0,_.jsx)("li",{children:"Log into your token with your PIN"}),(0,_.jsx)("li",{children:"Using the yellow forward button, scroll to 'Menu 4. Challenge'"}),(0,_.jsx)("li",{children:"Press 'OK'"}),(0,_.jsx)("li",{children:"Enter eight-digit beneficiary account number"}),(0,_.jsx)("li",{children:"Press 'OK', six-digit code will be displayed"}),(0,_.jsx)("li",{children:"Enter the code in 'security code' field"})]})]}),isVascoModal:!0},H={REQUIRED:"This field is required"},V=function(e){var i=e.value,n=e.onChange,a=e.bizEvent;return(0,_.jsxs)("div",{className:"BeneficiariesVascoSignature",children:[(0,_.jsx)("label",{htmlFor:"beneficiary-vasco-signature",children:(0,_.jsx)("small",{"data-testid":"beneficiaries-vasco-signature-title",children:"Please enter your security code"})}),(0,_.jsx)(p.Z,{type:p.L.Text,value:i,onChange:function(e){/^[0-9]*$/.test(e)&&n(e)},name:"vascoSignature",testId:"create-beneficiary-vasco-signature-input",placeholder:"Your security code",pattern:j.gf.PATTERN,maxLength:j.gf.MAX,errorMessages:H,className:"BeneficiariesVascoSignature__input",required:!0,"aria-describedby":"create-beneficiary-vasco-signature-format",id:"beneficiary-vasco-signature"}),(0,_.jsx)("p",{id:"create-beneficiary-vasco-signature-format",className:"sr-only",children:"The signature must be 6 digits and contain only numbers (0-9)"}),(0,_.jsx)("div",{className:"BeneficiariesVascoSignature__info",children:(0,_.jsx)(K.Z,{className:"BeneficiariesVascoSignature__info-button",testId:"benef
1iciaries-digital-signature-info-button",modalContent:z,bizEvent:a,iconPosition:"start",name:"How do I generate a security code",id:"beneficiaries-signature-info",children:(0,_.jsx)("small",{children:"How do I generate a security code?"})})})]})},Q=n(77735),W=function(e){var i=e.beneficiary,n=e.setBeneficiary,a=e.onEdit,r=i.beneficiaryType,t=(0,s.v9)(P.lR),d={action:"click",section:(null===r||void 0===r?void 0:r.toLowerCase())+"Payments",category:(null===r||void 0===r?void 0:r.toLowerCase())+"Flow"},l=(0,c.Z)((0,c.Z)({},d),{},{type:"com.web.beneficiaryVascoSignature"}),u=i.securityContext.vascoSignature,f=!!(u&&(0,Q.s9)(j.gf.PATTERN,u)&&u.length<=j.gf.MAX),m=function(){n(null),o.Z.resetAccountLookup(),(0,X.Gd)((0,c.Z)((0,c.Z)({},d),{},{type:"com.web.beneficiaryReviewCancel"}))};return(0,_.jsxs)("div",{className:"NewBeneficiaryReview","data-testid":"new-beneficiary-review",children:[(0,_.jsxs)("div",{className:"NewBeneficiaryReview__section info","data-testid":"new-beneficiary-review-selection-info",children:[(0,_.jsx)("p",{children:"Before setting up this beneficiary please consider:"}),(0,_.jsx)("p",{children:(0,_.jsx)("strong",{children:"Did you receive the beneficiary\u2019s details by email, social media or any other form of electronic message?"})}),(0,_.jsx)("ul",{children:(0,_.jsx)("li",{children:"Fraudsters can intercept messages; please confirm details verbally with the beneficiary."})}),(0,_.jsx)("p",{children:"To ensure that you don\u2019t suffer any losses and if you are concerned about the above please contact the bank immediately."})]}),(0,_.jsxs)("div",{className:"NewBeneficiaryReview__section",children:[(0,_.jsx)("h4",{children:(0,_.jsx)("strong",{children:"Beneficiary details"})}),(0,_.jsxs)("div",{className:"NewBeneficiaryReview__details-row",children:[(0,_.jsx)("div",{className:"NewBeneficiaryReview__details-label",children:"Name"}),(0,_.jsx)("div",{className:"NewBeneficiaryReview__details-value",children:i.beneficiaryName})]}),(0,_.jsxs)("div",{className:"NewBeneficiaryReview__details-row",children:[(0,_.jsx)("div",{className:"NewBeneficiaryReview__details-label",children:"Account"}),(0,_.jsxs)("div",{className:"NewBeneficiaryReview__details-value",children:[(0,_.jsxs)("div",{children:[" ",i.accountNumber]}),(0,_.jsxs)("div",{children:[" ",i.sortCode]})]})]}),(0,_.jsxs)("div",{className:"NewBeneficiaryReview__details-row",children:[(0,_.jsx)("div",{className:"NewBeneficiaryReview__details-label",children:"Reference"}),(0,_.jsx)("div",{className:"NewBeneficiaryReview__details-value",children:i.reference&&(0,_.jsx)("div",{children:i.reference.line1})})]}),(0,_.jsx)(v.Z,{}),(0,_.jsx)("div",{children:(0,_.jsx)(V,{value:u,onChange:function(e){return n((0,c.Z)((0,c.Z)({},i),{},{securityContext:{vascoSignature:e}}))},bizEvent:l})}),(0,_.jsxs)("div",{className:"NewBeneficiaryReview__buttons",children:[(0,_.jsx)(h.Z,{variant:"secondary",onClick:m,className:"NewBeneficiaryReview__button",testId:"create-beneficiary-cancel-button",children:"Cancel"}),(0,_.jsx)(h.Z,{variant:"secondary",onClick:a,className:"NewBeneficiaryReview__button",testId:"create-beneficiary-edit-button",disabled:t===g.$B.CREATING_BENEFICIARY,children:"Edit"}),(0,_.jsx)(h.Z,{variant:"primary",onClick:function(){o.Z.createBeneficiary(i,m),(0,X.Gd)((0,c.Z)((0,c.Z)({},d),{},{type:"com.web.beneficiaryReviewSave"}))},testId:"create-beneficiary-save-button",className:"NewBeneficiaryReview__button",disabled:t===g.$B.CREATING_BENEFICIARY||!f,children:"Save"})]})]})]})},J={PATTERN:"You've used restricted symbols",REQUIRED:"This field is required"},ee=function(e){var i=e.beneficiary,n=e.setBeneficiary,t=i.beneficiaryType,s=(0,r.useState)(!1),o=(0,a.Z)(s,2),d=o[0],l=o[1],u={action:"click",section:(null===t||void 0===t?void 0:t.toLowerCase())+"Payments",category:(null===t||void 0===t?void 0:t.toLowerCase())+"Flow"};return(0,_.jsx)("div",{"data-testid":"new-beneficiary",children:d?(0,_.jsx)(W,{beneficiary:i,setBeneficiary:n,onEdit:function(){l(!1),(0,X.Gd)((0,c.Z)((0,c.Z)({},u),{},{type:"com.web.beneficiaryReviewEdit"}))}}):(0,_.jsx)($,{beneficiary:i,setBeneficiary:n,onSave:function(){l(!0),(0,X.Gd)((0,c.Z)((0,c.Z)({},u),{},{type:"com.web.beneficiaryCreateSave"}))}})})},ie=n(64214),ne=[{name:"Within the UK",testId:"within-uk-tab"},{name:"Outside the UK",testId:"outside-uk-tab"},{name:"Salary",testId:"salary-tab"},{name:"Supplier",testId:"supplier-tab"}],ae=function(e){return{beneficiaryName:"",accountNumber:"",sortCode:"",securityContext:{vascoSignature:""},reference:{line1:""},beneficiaryType:e}},re=function(e){var i=e.tabIndexes,n=e.setTabIndexes,t=(0,ie.M)().searchQuery,f=(0,r.useState)(null),m=(0,a.Z)(f,2),y=m[0],b=m[1],h=(0,r.useState)(null),v=(0,a.Z)(h,2),x=v[0],p=v[1],j=(0,s.v9)(P.OO),N=(0,s.v9)(P.jA),I=(0,s.v9)(P.pm),B=(0,s.v9)(P.lR),w=(0,D.qw)(B);(0,r.useEffect)((function(){w&&(b((0,c.Z)({},y)),o.Z.fetchBeneficiaries())}),[w]),(0,r.useEffect)((function(){if(B===g.$B.FETCH_BENEFICIARIES_SUCCESS){var e=(0,D.ty)(y)?null:(0,D.qC)(j,null===y||void 0===y?void 0:y.id,null===y||void 0===y?void 0:y.type);b(e)}}),[B]);var Z,k=(0,D.J4)(I,j),T=(0,D.zw)(I,N),R=function(e){o.Z.navigateToBeneficiariesGroup(e)},L=function(e){b(null),p(ae(e))},S=function(e){p(null),b(e)};return(0,_.jsx)("div",{className:"BeneficiariesContainer",children:(0,_.jsx)(l.Z,{children:(0,_.jsxs)("div",{className:"BeneficiariesContainer__main",children:[(0,_.jsxs)("div",{className:"BeneficiariesContainer__left",children:[(0,_.jsx)(d.Z,{onSearch:function(){o.Z.setQuery(t||"")},placeholder:"Search beneficiaries"}),(0,_.jsxs)(u.Z,{selectedTabIndex:i.tabIndex,onSelect:function(e){n((0,c.Z)((0,c.Z)({},i),{},{tabIndex:e}))},tabList:ne,className:"BeneficiariesContainer__left-tabs",children:[(0,_.jsx)(M,{beneficiaries:k[g.td.TPP],onItemClick:S,selected:y}),(0,_.jsx)(M,{beneficiaries:k[g.td.INTERNATIONAL],onItemClick:S,selected:y}),(0,_.jsx)(M,{beneficiaries:k[g.td.SALARY],groups:T[g.YT.SALARY],onCreateGroup:function(){return R(g.YT.SALARY)},onCreateBeneficiary:function(){return L(g.YT.SALARY)},onItemClick:S,selected:y,tabIndexes:i,setTabIndexes:n}),(0,_.jsx)(M,{beneficiaries:k[g.td.SUPPLIER],groups:T[g.YT.SUPPLIER],onCreateGroup:function(){return R(g.YT.SUPPLIER)},onCreateBeneficiary:function(){return L(g.YT.SUPPLIER)},onItemClick:S,selected:y,tabIndexes:i,setTabIndexes:n})]})]}),(0,_.jsxs)("div",{className:"BeneficiariesContainer__right",children:[y?(Z=y,(0,D.ty)(Z)?(0,_.jsx)(E,{group:Z}):(0,_.jsx)(C,{beneficiary:Z})):null,x&&(0,_.jsx)(ee,{beneficiary:x,setBeneficiary:p})]})]})})})},te=n(23798),ce=n(28431),se=n(93107),oe=n(56884),de=function(e){var i=e.id,n=e.name,a=e.accountNumber,r=e.sortCode,t=e.reference;return(0,_.jsxs)("div",{className:"SelectedBeneficiaryItem",children:[(0,_.jsx)("div",{className:"SelectedBeneficiaryItem__column name",children:n}),(0,_.jsx)("div",{className:"SelectedBeneficiaryItem__column",children:a}),(0,_.jsx)("div",{className:"SelectedBeneficiaryItem__column",children:(0,oe.IY)(r)}),(0,_.jsx)("div",{className:"SelectedBeneficiaryItem__column",children:t}),(0,_.jsx)("div",{className:"SelectedBeneficiaryItem__icon",children:(0,_.jsx)(h.Z,{variant:"link",onClick:function(){o.Z.removeBeneficiary(i)}
1,testId:"remove-beneficiary-icon",name:"Remove beneficiary",className:"SelectedBeneficiaryItem__remove-button",children:(0,_.jsx)(se.Z,{icon:f.I7k})})})]})},le=function(e){var i=e.items;return(0,_.jsxs)("div",{className:"SelectedBeneficiary",children:[(0,_.jsxs)("div",{className:"SelectedBeneficiary__header",children:[(0,_.jsx)("div",{className:"SelectedBeneficiary__header-text",children:"Beneficiary"}),(0,_.jsx)("div",{className:"SelectedBeneficiary__header-text",children:"Account number"}),(0,_.jsx)("div",{className:"SelectedBeneficiary__header-text",children:"Sort code"}),(0,_.jsx)("div",{className:"SelectedBeneficiary__header-text",children:"Reference"})]}),(0,_.jsx)("div",{className:"SelectedBeneficiary__body",children:i.map((function(e){return(0,_.jsx)(de,{id:e.id,name:e.name,accountNumber:e.accountIdentification.iban,sortCode:e.accountIdentification.sortCode,reference:e.multiLineReference.line1},"payment-list-".concat(e.id))}))})]})},ue=n(21239),fe=n(17098),me=n(57604),ye={PATTERN:"You used forbidden characters for beneficiary group name",REQUIRED:"This field is required"},be=function(){(0,r.useEffect)((function(){ce.Z.setTopbar({title:"Create new beneficiary group",srOnlyContent:"Fill out the form to create new beneficiary group"})}),[]);var e=(0,me.l)().groupType,i=(0,s.v9)(P.lR),n=(0,s.v9)(P.ex),a=(0,s.v9)(P.G6),t=n.groupName,d=n.groupId,u=i===g.$B.CREATING_GROUP||i===g.$B.UPDATING_GROUP||!t,y=function(e){o.Z.addBeneficiaries([e])};return(0,_.jsxs)("div",{className:"BeneficiaryGroup",children:[(0,_.jsxs)(l.Z,{children:[(0,_.jsxs)("label",{htmlFor:"beneficiary-group-name",className:"BeneficiaryGroup__input",children:["Group name",(0,_.jsx)(p.Z,{onChange:o.Z.setGroupName,name:"beneficiaryGroupName",id:"beneficiary-group-name",required:!0,placeholder:"Enter group name",testId:"beneficiaries-group-name-input",value:t,pattern:j.PX.PATTERN,maxLength:j.PX.MAX,errorMessages:ye,ariaLabel:"Group name","aria-describedby":"beneficiary-group-name-format"})]}
1),(0,_.jsx)("p",{id:"beneficiary-group-name-format",className:"sr-only",children:"The beneficiary group name can include letters, numbers, spaces, and the following characters: comma, period, slash, colon, parentheses, ampersand, question mark, plus, minus, vertical bar, curly braces, equals, tilde, backtick, double quotes, single quotes, exclamation mark, at symbol, hash, dollar sign, percent sign, caret, ampersand, asterisk, and underscore. It can be up to 256 characters long."}),(0,_.jsxs)("div",{className:"BeneficiaryGroup__header",children:[(0,_.jsx)("h2",{className:"BeneficiaryGroup__header-title",children:"List of beneficiaries"}),(0,_.jsx)(h.Z,{variant:"primary",onClick:function(){m.Z.showModal({icon:f.r8p,modalCustomClassName:"BeneficiariesModal__wrapper",header:"Add beneficiaries",body:(0,_.jsx)(fe.Z,{withSearch:!0,beneficiaryType:e,onAddItem:y}),isScrollable:!0})},testId:"beneficiaries-add-button",id:"beneficiaries-add-button",className:"BeneficiaryGroup__add",children:"Add beneficiaries"})]}),(0,_.jsx)(le,{items:a})]}),(0,_.jsx)(ue.Z,{leftChild:(0,_.jsx)(h.Z,{testId:"back-button",variant:"secondary",onClick:o.Z.navigateToBeneficiariesLists,children:"Back"}),rightChild:(0,_.jsx)(h.Z,{variant:"primary",onClick:function(){(0,D.T2)(d)?o.Z.updateGroup((0,c.Z)((0,c.Z)({},n),{},{groupType:e})):o.Z.createGroup(t,e,a)},testId:"beneficiaries-group-add-button",disabled:!!u,children:(0,D.T2)(d)?"Save changes":"Save new group"})})]})},he=n(19044),ve=n(91538),xe=function(){var e=(0,t.$B)(),i=(0,me.l)();(0,he.t)(ve.Z.BENEFICIARIES);var n=(0,r.useState)({tabIndex:0,subTabIndex:0}),c=(0,a.Z)(n,2),s=c[0],d=c[1];return(0,r.useEffect)((function(){return o.Z.fetchBeneficiaries(),o.Z.reset}),[]),(0,r.useEffect)((function(){i.navigateFrom&&(i.navigateFrom===Z.hv.SALARY?d({tabIndex:2,subTabIndex:1}):i.navigateFrom===Z.hv.SUPPLIER&&d({tabIndex:3,subTabIndex:1}))}),[i]),(0,_.jsxs)("div",{className:"Beneficiaries",children:[(0,_.jsx)(te.Z,{}),(0,_.jsxs)(t.rs,{children:[(0,_.jsx)(t.AW,{path:"".concat(e.path,"/group"),children:(0,_.jsx)(be,{})}),(0,_.jsx)(t.AW,{path:e.path,children:(0,_.jsx)(re,{tabIndexes:s,setTabIndexes:d})})]})]})}}}]);

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.