1"use strict";(window.webpackChunksdc_neos=window.webpackChunksdc_neos||[]).push([[5072],{16058:(e,n,t)=>{t.d(n,{f:()=>K});var a=t(77106),c=t(65995),o=t(18297),r=t(34242),l=t(67294),i=t(79551),u=t(58868),s=t(71237),d=t(82825),m=t(22092),y=t(18480),v=t(15726),b=t(57709),f=t(14578),p=t(82412),h=t(96770),_=t(11054),E=t(44926),g=t(88767),I=t(45478),N=t(45849),C=t(99373),w=t(90062),A=t(48659);function T(e,n,t,a,c,o,r){try{var l=e[o](r),i=l.value}catch(e){return void t(e)}l.done?n(i):Promise.resolve(i).then(a,c)}function D(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var S,k,O=t(35666);(k=S||(S={})).DEPOSIT="DEPOSIT",k.WITHDRAWAL="WITHDRAWAL";var K=function(e){var n=e.custodyAccount,t=e.onClose,k=e.isDepositOnly,K=(0,b.f)(),P=(0,a.h)(),Z=P.mutateAsync,x=P.isLoading,H=P.error,R=(0,c.$)(),L=R.mutateAsync,V=R.isLoading,W=R.error,F=(0,f.Z)(),U=H||W;U&&F.dismissable(U);var q,B=x||V,M=(0,p.aj)().selectedAccountHolders,j=(0,A.Z)().data,Q=(0,C.Hq)({accountHolders:M,includeDataAboutGuarantees:j===w.vZ.PRIVATE}),z=Q.data,G=void 0===z?[]:z,X=Q.isLoading,$=Q.refetch,J=(0,h.pt)(n.agreementCombinedKey),Y=null==G?void 0:G.filter(function(e){return J(e)}),ee=Y.length>0&&Y[0]||void 0,ne=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.forEach(function(n){D(e,n,t[n])})}return e}({accountCombinedKey:null==ee?void 0:ee.accountCombinedKey},k?{transferType:S.DEPOSIT}:{}),te=(0,g.useQueryClient)(),ae=(q=O.mark(function e(a){return O.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a.accountCombinedKey&&a.amount){e.next=2;break}throw new v.g("");case 2:if(a.transferType!==S.DEPOSIT){e.next=9;break}return e.next=5,Z({custodyAccountCombinedKey:n.custodyAccountCombinedKey,fromAccountCombinedKey:a.accountCombinedKey,amount:parseFloat(a.amount)});case 5:te.invalidateQueries(I.d_),te.invalidateQueries(N.Bn),$(),t();
1case 9:if(a.transferType!==S.WITHDRAWAL){e.next=16;break}return e.next=12,L({custodyAccountCombinedKey:n.custodyAccountCombinedKey,toAccountCombinedKey:a.accountCombinedKey,amount:parseFloat(a.amount)});case 12:te.invalidateQueries(I.d_),te.invalidateQueries(N.Bn),$(),t();case 16:case"end":return e.stop()}},e)}),function(){var e=this,n=arguments;return new Promise(function(t,a){var c=q.apply(e,n);function o(e){T(c,t,a,o,r,"next",e)}function r(e){T(c,t,a,o,r,"throw",e)}o(void 0)})});return l.createElement(i.l0,{initialValues:ne,onSubmit:ae},function(e){var t,a=e.values,c=e.form,i=e.handleSubmit,v=e.hasValidationErrors,b=a.transferType&&(0,h.IM)(K,function(e){switch(e.transferType){case"DEPOSIT":var t;return null===(t=Y.find(function(n){return n.accountCombinedKey===e.accountCombinedKey}))||void 0===t?void 0:t.accountBalance.balanceDisposable.decimalValue;case"WITHDRAWAL":var a;return null===(a=n.availableBalance)||void 0===a?void 0:a.amount.decimalValue}}(a),!0)||[];return l.createElement(l.Fragment,null,l.createElement("div",{className:"deposit-and-withdrawal"},l.createElement(E.Z,{h1:!0,labels:{title:k?K.global.deposit:K.depositAndWithdrawal}}),X&&l.createElement(_.Z,null),!X&&l.createElement(l.Fragment,null,(0,h.VS)(n),l.createElement(u.Z,{fieldType:{label:K.global.selectBankAccount,validationRules:[]},id:"accountCombinedKey",selectedAccountKey:a.accountCombinedKey,groups:M.map(function(e){var n=(0,o.Q5)(Y,e);return{title:M.length>1?e.name:"",options:(0,s.Mv)(n)}}).filter(function(e){return e.options.length>0}),onOptionSelected:function(e){e?c.change("accountCombinedKey",e.accountCombinedKey):c.change("accountCombinedKey","")},onClearSelected:function(){c.change("accountCombinedKey","")}}),!k&&l.createElement(m.e5,{id:"transferType",type:r.n.Radio,label:K.transferType,validationRules:[],options:[{value:"DEPOSIT",label:K.global.deposit},{value:"WITHDRAWAL",label:K.global.withdrawal}]}),l.createElement(y.Z,{label:K.global.amount,validationRules:b,id:"amount",type:r.n.Number,fractionDigits:2,annotation:null===(t=n.availableBalance)||void 0===t?void 0:t.currencyCode}))),l.createElement(d.O,{actionList:[{iconId:"icon_28_checkmark",label:K.global.approve,onClick:i,disabled:v||!a.accountCombinedKey||!a.transferType||!a.amount||parseFloat(a.amount)<=0,loading:B,color:"default"}]}))})}},58483:(e,n,t)=>{t.d(n,{Z:()=>y});var a=t(67294),c=t(94184),o=t.n(c),r=t(28968),l=t(69832);function i(e,n,t,a,c,o,r){try{var l=e[o](r),i=l.value}catch(e){return void t(e)}l.done?n(i):Promise.resolve(i).then(a,c)}function u(e,n){return null!=n&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n}var s=t(35666);const d=function(e){var n,t,c,d,m=(c=(0,a.useState)(!1),d=2,function(e){if(Array.isArray(e))return e}(c)||function(e,n){var t=[],a=!0,c=!1,o=void 0;try{for(var r,l=e[Symbol.iterator]();!(a=(r=l.next()).done)&&(t.push(r.value),!n||t.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==l.return||l.return()}finally{if(c)throw o}}return t}(c,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),y=m[0],v=m[1],b=(0,l.t)();return a.createElement("li",{className:e.className},a.createElement(r.Z,{fullWidth:!0,color:null!==(n=e.color)&&void 0!==n?n:"invert",className:o()("action-menu__item",{"action-menu__item--text-only":!e.iconId,"action-menu__item--active":e.active,"action-menu__item--disabled":e.disabled}),type:"button",iconId:e.iconId,loading:y||e.loading,onClick:(t=s.mark(function n(t){var a;return s.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(t.preventDefault(),t.stopPropagation(),!u(a=e.onClick(t),Promise)){n.next=11;break}return v(!0),n.prev=5,n.next=8,a;case 8:return n.prev=8,b.current&&v(!1),n.finish(8);case 11:case"end":return n.stop()}},n,null,[[5,,8,11]])}),function(){var e=this,n=arguments;return new Promise(function(a,c){var o=t.apply(e,n);function r(e){i(o,a,c,r,l,"next",e)}function l(e){i(o,a,c,r,l,"throw",e)}r(void 0)})}),onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||e.stopPropagation()},disabled:e.disabled||y,trailingIcon:e.trailingIcon},a.createElement("span",{className:"action-menu__item-label"},e.label)))};function m(){return m=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},m.apply(this,arguments)}const y=function(e){return a.createElement("ul",{className:"action-menu"},e.items.map(function(e,n){return a.createElement(d,m({key:n},e))}),e.children)}},82825:(e,n,t)=>{t.d(n,{O:()=>l});var a=t(94184),c=t.n(a),o=t(67294),r=t(28968),l=function(e){return o.createElement("div",{className:"modal-action-buttons"},e.actionList.map(function(n){var t;return o.createElement(r.Z,{key:n.label,onClick:n.onClick,className:c()("modal-action-buttons__button ".concat(n.className),{"modal-action-buttons__button-small":"small"===e.buttonHeight,"modal-action-buttons__button-medium":"medium"===e.buttonHeight}),color:null!==(t=n.color)&&void 0!==t?t:"invert",disabled:n.disabled,fullWidth:!0,noBorder:n.noBorder,loading:n.loading,iconId:n.iconId,iconCenter:!0,trailingIcon:n.trailingIcon},n.label)}))}},16485:(e,n,t)=>{t.r(n),t.d(n,{default:()=>K});var a=t(67294),c=t(94184),o=t.n(c),r=t(45478),l=t(21135),i=t(33203),u=t(96846),s=t(30738),d=t(9143),m=t(49836),y=t(16058),v=t(28968),b=t(48491),f=t(96967),p=t(17249),h=t(11054),_=t(56996),E=t(1822),g=t(31354),I=t(57709),N=t(14578),C=t(96770),w=t(86817),A=t(10717),T=t(95171);function D(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=[],a=!0,c=!1,o=void 0;try{for(var r,l=e[Symbol.iterator]();!(a=(r=l.next()).done)&&(t.push(r.value),!n||t.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==l.return||l.return()}finally{if(c)throw o}}return t}
1(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var S="custody-account-header-se",k=function(e){var n=(0,I.f)(),t=e.custodyAccountCombinedKey,c=e.custodyAccountDetailsUrl,k=e.investmentAgreementDetailsUrl,O=D((0,g.Z)(),2),K=O[0],P=O[1],Z=null==P?void 0:P.size,x=_.vc.features.enableInvestmentBuySell,H=D((0,a.useState)(!1),2),R=H[0],L=H[1],V=D((0,a.useState)(!1),2),W=V[0],F=V[1],U=D((0,a.useState)(!1),2),q=U[0],B=U[1],M=D((0,a.useState)(!1),2),j=M[0],Q=M[1],z=(0,T.F)(),G=function(){var e=Math.round(100*window.devicePixelRatio);Q(e>100)};(0,a.useEffect)(function(){return G(),window.addEventListener("resize",G),function(){window.removeEventListener("resize",G)}},[]);var X=(0,s.i)({custodyAccountDetailsUrl:c,investmentAgreementDetailsUrl:k}),$=X.data,J=X.isLoading,Y=(0,r.XF)({custodyAccountCombinedKey:t},{refetchInterval:z}),ee=Y.data,ne=Y.isLoading,te=Y.error,ae=(0,l.dc)(),ce=ae.data,oe=ae.error,re=ae.isLoading,le=null==ce?void 0:ce.agreementRoles.find(function(e){return e.agreement===(null==ee?void 0:ee.agreementCombinedKey)}),ie=(0,N.Z)(),ue=te||oe;ue&&ie.dismissable(ue);var se=(0,a.useMemo)(function(){return(null==ee?void 0:ee.standardTaxIncome)&&E.H.formatCurrency(ee.standardTaxIncome.amount.decimalValue,ee.standardTaxIncome.currencyCode,{showCurrencyDisplay:!0})},[ee]),de=(0,a.useMemo)(function(){return(null==ee?void 0:ee.balance)&&E.H.formatCurrency(ee.balance.amount.decimalValue,ee.balance.currencyCode,{showCurrencyDisplay:!0})},[ee]),me=(0,a.useMemo)(function(){return(null==ee?void 0:ee.availableBalance)&&E.H.formatCurrency(ee.availableBalance.amount.decimalValue,ee.availableBalance.currencyCode,{showCurrencyDisplay:!0})},[ee]),ye=(null==ee?void 0:ee.bankAccountNumberDetails)?E.H.formatAccountAndClearingNumber(ee.bankAccountNumberDetails.accountNumber,ee.bankAccountNumberDetails.clearingNumber):"",ve=null==ee?void 0:ee.marketValue,be=(0,a.useMemo)(function(){return ve&&E.H.formatCurrency(ve.amount.decimalValue,ve.currencyCode,{showCurrencyDisplay:!0})},[ve]),fe=ve&&(null==ee?void 0:ee.balance)&&(0,w.zF)(ve,ee.balance),pe=(0,a.useMemo)(function(){return fe&&E.H.formatCurrency(fe.amount.decimalValue,fe.currencyCode,{showCurrencyDisplay:!0})},[fe]),he=null==ee?void 0:ee.changeToday.percentage,_e=he&&E.H.formatPercentage(he),Ee=o()(S,Z&&"".concat(S,"--").concat(Z));if(ne||re)return a.createElement("div",{className:Ee,ref:K},a.createElement("div",{className:"custody-account-header-se__content"},a.createElement(h.Z,{currentColor:!0})));var ge=x&&(null==le?void 0:le.roles.includes(i.u.INVESTMENT_UNIVERSE_FUNDS))&&(0,C.Qy)(ee),Ie=(null==le?void 0:le.roles.includes(i.u.INVESTMENT_UNIVERSE_DEPOSIT_WITHDRAWAL))&&(0,C.a6)(ee),Ne=Ie||ge,Ce=(null==le?void 0:le.roles.includes(i.u.INVESTMENT_UNIVERSE_DEPOSIT_WITHDRAWAL))&&(0,C.dr)(ee),we=(null==ee?void 0:ee.accountTypeId)&&[A.q.FUND].includes(null==ee?void 0:ee.accountTypeId)?n.standardTaxIncome:n.global.balance,Ae=(null==ee?void 0:ee.accountTypeId)&&[A.q.FUND].includes(null==ee?void 0:ee.accountTypeId)?se:de,Te=(null==ee?void 0:ee.accountTypeId)&&[A.q.FUND].includes(null==ee?void 0:ee.accountTypeId)?n.accountForPayouts:(null==ee?void 0:ee.accountTypeId)&&[A.q.DEPOT,A.q.IP,A.q.ISK,A.q.NET_DEPOT].includes(null==ee?void 0:ee.accountTypeId)?n.availableForTrade:n.global.availableBalance,De=(null==ee?void 0:ee.accountTypeId)&&[A.q.FUND].includes(null==ee?void 0:ee.accountTypeId)?ye:me,Se=n.totalValue,ke=(null==ee?void 0:ee.accountTypeId)&&[A.q.DEPOT,A.q.IP,A.q.ISK,A.q.NET_DEPOT].includes(null==ee?void 0:ee.accountTypeId)?pe:be;return a.createElement("div",{className:Ee,ref:K},a.createElement("div",{className:"custody-account-header-se__content"},ee&&a.createElement(a.Fragment,null,a.createElement("div",{className:"custody-account-header-se__top-info"},a.createElement("div",{className:"custody-account-header-se__account-selector"},a.createElement("button",{className:"custody-account-header-se__button-name",onClick:function(){return L(!0)}},ee.accountName,a.createElement("span",{className:"custody-account-header-se__account-selector-indicator"},R&&a.createElement(f.Z,{iconId:"icon_16_arrow-up"}),!R&&a.createElement(f.Z,{iconId:"icon_16_arrow-down"}
1))),ee.accountNumber),be&&a.createElement("div",{className:"custody-account-header-se__market-value"},a.createElement("div",{className:"custody-account-header-se__market-value-label"},Se),a.createElement("div",{className:"custody-account-header-se__market-value-amount"},ke),a.createElement("div",{className:"custody-account-header-se__disclaimer"},a.createElement("span",{id:"weighted-average-disclaimer",className:"sr-only"},n.weightedAverageDisclaimer),a.createElement(v.Z,{className:"custody-account-header__tooltip",iconCenter:!0,small:!0,iconId:"icon_16_info-circle",color:"link",tooltip:n.weightedAverageDisclaimer,"aria-label":n.weightedAverageInformation,"aria-describedby":"weighted-average-disclaimer"})))),_e&&a.createElement("div",{className:"custody-account-header-se__development"},a.createElement("div",{className:"custody-account-header-se__development-label"},a.createElement("span",null,"Â ")),a.createElement("div",{className:"custody-account-header-se__development-percentage"},a.createElement("div",{className:"custody-account-header-se__delta-placeholder"},"Â "))),a.createElement("div",{className:"custody-account-header-se__content-container"},a.createElement("div",{className:"".concat(o()({"custody-account-header__items_container":Ne,"custody-account-header__items_container--flat":!Ne}))},a.createElement("div",{className:o()({"custody-account-header-se__items":!Ne,"custody-account-header-se__sub-items":Ne})},de&&a.createElement("div",{className:"custody-account-header-se__item"},a.createElement("div",{className:"custody-account-header-se__item-label"},we),a.createElement("div",{className:"custody-account-header-se__item-value"},a.createElement(b.u,null,Ae))),me&&a.createElement("div",{className:"custody-account-header-se__item"},a.createElement("div",{className:"custody-account-header-se__item-label"},Te),a.createElement("div",{className:"custody-account-header-se__item-value"},a.createElement(b.u,null,De)))),a.createElement("div",{className:"custody-account-header-se__items__buttons"},ge&&a.createElement(v.Z,{type:"button",shadow:!0,onClick:function(){F(!0)}},n.fundTrading),(Ie||Ce)&&a.createElement(v.Z,{className:o()({"custody-account-header-se__items__buttons__deposit-and-withdrawal":ge}),type:"button",shadow:!0,onClick:function(){B(!0)}},Ce?n.global.deposit:n.depositAndWithdrawal)))),a.createElement(p.Z,{className:"custody-account-header-se__account-selector-modal",ariaHideApp:!1,isOpen:R,narrow:!0,onRequestClose:function(){L(!1)}},a.createElement(d.Z,{stopAppOnUncaught:!1},a.createElement(u.Z,{labels:{headline:n.global.custodyAccountSE,balanceDisposable:n.global.availableBalance},selectedId:ee.custodyAccountCombinedKey,sections:$,isLoading:J}))),a.createElement(p.Z,{noInnerOverflowScroll:!j,isOpen:W,onRequestClose:function(){return F(!1)},isFlex:!0},a.createElement(m.S,{custodyAccount:ee,custodyAccountIsLoading:ne})),a.createElement(p.Z,{isOpen:q,onRequestClose:function(){return B(!1)}},a.createElement(y.f,{custodyAccount:ee,onClose:function(){return B(!1)},isDepositOnly:Ce})))))},O=t(80449);const K=function(e){var n=e.contextModel,t=n.custodyAccountDetailsUrl,c=n.investmentAgreementDetailsUrl,o=e.contextModel.custodyAccountCombinedKey||(0,O.EH)("id");if(!o)throw new Error("No ID available");return a.createElement(k,{custodyAccountCombinedKey:o,custodyAccountDetailsUrl:t,investmentAgreementDetailsUrl:c})}}}]); 2//# sourceMappingURL=5072.cb6989f5609522f962ca.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.