import{a as on,b as ce,c as an}from"./chunk-MKWF4L3H.js";import{a as bn,b as On,c as Nn,d as Bt}from"./chunk-UZNRU75R.js";import{a as ci}from"./chunk-VEYYV2KL.js";import{a as Ro}from"./chunk-QFEE4QD6.js";import{b as xo,c as Fo,i as Do,m as Lo,n as wo,o as ko,t as Uo,u as ee,v as te,w as ne}from"./chunk-BJWJC4VG.js";import{c as Ae,d as Dt,f as Po,g as ui,h as we}from"./chunk-OGAALIGY.js";import{A as Qt,Aa as Ao,Ba as Vt,Ca as yo,D as en,Da as Be,E as ot,Ea as Oe,Ga as Ne,Ja as ai,Ka as Mo,Ma as si,Na as li,Oa as at,Va as st,Ya as ze,_ as ei,aa as ti,ca as ni,fa as ii,g as $,ga as ri,i as J,j as le,k as Co,l as _e,m as V,n as Xn,o as it,oa as To,p as rt,pa as Io,q as Le,qa as tn,t as Ie,ta as oi,ua as bo,v as Jt,va as Oo,w as Rt,x as qn,xa as nn,y as Yn,ya as rn,za as No}from"./chunk-M42733QC.js";import{Ac as vo,B as jn,Bb as mo,Ca as Qi,Cb as Et,D as no,Db as vt,Dc as So,Eb as St,Ec as Jn,Fc as Qn,Gb as G,H as Ue,Hb as fo,I as Zn,Ia as so,Ib as he,Ic as ae,Ja as In,K as k,Ka as a,La as x,Ob as d,P as oe,Pb as f,Qb as De,R as io,Sa as W,Sc as be,T as xt,Ua as y,Ub as go,Vc as pi,W as Wn,Wa as nt,Wc as Z,Xa as p,Xc as X,Ya as lo,Z as de,Za as co,_ as Re,a as ge,aa as N,b as Qe,cb as l,db as c,ea as C,eb as U,fa as ro,fb as er,ga as me,gb as tr,gc as ho,ha as h,i as j,ia as Se,ib as Y,jc as _o,k as Te,kc as Ut,l as et,lb as b,lc as Pt,ma as P,mb as T,mc as q,na as oo,nb as po,ob as uo,pa as Tn,q as I,r as u,sa as ao,sc as Ve,ta as R,u as F,ua as D,v as Q,vb as qt,wa as Ft,wb as _,xb as A,xc as Yt,y as v,yb as M,z as Xt,za as tt,zb as $e,zc as Eo}from"./chunk-RPD35D2F.js";var Vo=new me("ClientErrorHandler");var Ke=(()=>{let t=class t{getDepotIndex(){let n=window.location.pathname.match(Ds);return n&&n.length>=2?n[1]:""}getAnlagezielId(){let n=window.location.pathname.match(Rs);return n&&n.length>=4?Number(n[3]):-1}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Rs=/\/depot(\/(\d+)\/anlageziel)\/(\d+)/,Ds=/\/depot\/(\d+)/;function zo(){return F(ze("pilotTransactionsAsStandalonePages",{default:!1}))}function Cp(){return F(ze("pilotUmtauschAsStandalonePage",{default:!1}))}function Ho(){return F(ze("pilotNeukaufAsStandalonePage",{default:!1}))}function Go(){return F(ze("releaseVlNeukaufAsStandalonePage",{default:!1}))}function Tp(){return F(ze("releaseAuszahlplanAsStandalonePage",{default:!1}))}var Ct=function(e){return e.ERMITTELT="ERMITTELT",e.KEINE_ZIELMARKT_INFORMATIONEN="KEINE_ZIELMARKTINFORMATIONEN",e.FEHLER_BEIM_ERMITTELN="FEHLER_BEIM_ERMITTELN",e}(Ct||{}),$o=new me("EinzelfondsZielmarktPruefungsService");var Ko=new me("ValidateChangeInterceptor");var jo=new me("ValidateBuyInterceptor");var Zo=new me("ValidateExchangeInterceptor");var Wo=new me("root");var Xo=new me("NonBankingDaysDataSource");var ye=class extends Error{};var nr=function(e){return e.AMOUNT_INVALID="AMOUNT_INVALID",e.BANK_ACCOUNT_INVALID_ACTION_COMBINATION="BANK_ACCOUNT_INVALID_ACTION_COMBINATION",e.CUSTOMER_EMAIL_ADDRESS_MISSING="CUSTOMER_EMAIL_ADDRESS_MISSING",e.DASKA_ERROR="DASKA_ERROR",e.GENERIC_ERROR="GENERIC_ERROR",e.IBAN_NOT_APPLICABLE="IBAN_NOT_APPLICABLE",e.INSUFFICIENT_SAVINGSPLAN="INSUFFICIENT_SAVINGSPLAN",e.ORDER_FAILED_COMPLETELY="ORDER_FAILED_COMPLETELY",e.ORDER_REQUEST_INVALID="ORDER_REQUEST_INVALID",e.OR_INVALID_AB_AFTER_BIS_DATE="OR_INVALID_AB_AFTER_BIS_DATE",e}(nr||{}),qo=function(e){return e.UNKNOWN_ERROR="Unknown error",e}(qo||{}),Me=function(e){return e.BUSINESS_ERROR="BUSINESS_ERROR",e.TECHNICAL_ERROR="TECHNICAL_ERROR",e.AUTHORIZATION_ERROR="AUTHORIZATION_ERROR",e}(Me||{}),zt=class extends Error{constructor(t,r,n){super(r),this.type=t,this.message=r,this.daskaErrorCode=n}},Ls=[3200],An=e=>{let t=ks(e),r=Me.TECHNICAL_ERROR,n=e.message,i;return e.status===403?r=Me.AUTHORIZATION_ERROR:t&&Ls.find(o=>o===t.errorCode.major)?(r=Me.BUSINESS_ERROR,n=ws(t),i=t.errorCode):e.status===500?r=Me.TECHNICAL_ERROR:e.status===409&&e.error.errorKey===nr.OR_INVALID_AB_AFTER_BIS_DATE&&(r=Me.BUSINESS_ERROR,n="UIDEPOT.INVALID_ORDER_DATES"),new zt(r,n,i)},ws=e=>e.errorCode.minor===40434?"UIDEPOT.SEPA_AKTIVIERUNG.NICHT_MOEGLICH.ERROR.TEXT":e.reason,ks=e=>{if(e?.error?.errorKey===nr.DASKA_ERROR&&e?.error?.errorCode){if(e.error.errorCode===qo.UNKNOWN_ERROR)return null;let t=e.error.errorCode.split(".").map(r=>parseInt(r,10));return{errorCode:{major:t[0],minor:t[1]},reason:e.error.reason}}return null};var Yo=(()=>{let t=class t{constructor(n){this.http=n,this.cache={},this.URL="/risk-functional-service"}getFondsZielmarktKonflikte$(n){return this.http.get(`${this.URL}/advisor/target-market?isin=${n}`).pipe(k(()=>Q(new ye)),v(i=>{if(i.includes("INTERNAL_ERROR"))throw new zt(Me.BUSINESS_ERROR,"");return i.filter(o=>o!=="SUCCESS").map(o=>o)}))}};t.\u0275fac=function(i){return new(i||t)(h(ae))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var di=(()=>{let t=class t{constructor(n){this.riskService=n,this.pendingCalls=new Map}zielmarktkonflikte$(n){if(this.pendingCalls.has(n))return this.pendingCalls.get(n);let i=new Te;return this.pendingCalls.set(n,i),this.riskService.getFondsZielmarktKonflikte$(n).pipe(N({next:o=>{i.next(o),i.complete()},error:o=>{i.error(o),i.complete()}}),xt(()=>this.pendingCalls.delete(n)))}check$(n){return this.zielmarktkonflikte$(n).pipe(Ue(i=>i!=null),oe(1),v(()=>Ct.ERMITTELT),k(i=>Vs(i)))}};t.\u0275fac=function(i){return new(i||t)(h(Yo))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Vs=e=>e instanceof zt&&e.type===Me.BUSINESS_ERROR?F(Ct.KEINE_ZIELMARKT_INFORMATIONEN):F(Ct.FEHLER_BEIM_ERMITTELN);var sn=(()=>{let t=class t{constructor(){this.requestClose=new tt}navigateTo(n){if(!this.model){this.requestClose.emit(K.ERRORED);return}this.currentStep=n,window.scroll(0,0)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=P({type:t,selectors:[["ng-component"]],outputs:{requestClose:"requestClose"},decls:0,vars:0,template:function(i,o){},encapsulation:2});let e=t;return e})(),K=function(e){return e.FINISHED="FINISHED",e.CANCELLED="CANCELLED",e.ERRORED="ERRORED",e}(K||{}),ie=(()=>{let t=class t{constructor(){this.navigateTo=new tt,this.closeEvent=new tt}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=P({type:t,selectors:[["ng-component"]],inputs:{model:"model",form:"form"},outputs:{navigateTo:"navigateTo",closeEvent:"closeEvent"},decls:0,vars:0,template:function(i,o){},encapsulation:2});let e=t;return e})();var Bs=e=>({fondsName:e});function zs(e,t){e&1&&(l(0,"vh-notification",8),_(1),d(2,"translate"),c()),e&2&&(a(),M(" ",f(2,1,"SELECT_NEW_OR_EXISTING_STEP__NO_SELECTION")," "))}var Qo=(()=>{let t=class t extends ie{constructor(){super(),this.buttonConfigs={nextButton:{dataTestId:"select-umtausch-continue-button"},abortButton:{dataTestId:"select-umtausch-abort-button"}},this.UmtauschSteps=xe,this.currentSelection=null,this.showNoSelectionOverlay=!1,this.CLOSE_REASON=K}onChosen(){if(!this.currentSelection){this.showNoSelectionOverlay=!0;return}this.navigateTo.emit(this.currentSelection)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=P({type:t,selectors:[["app-select-new-or-existing-fund-step"]],standalone:!0,features:[W,G],decls:22,vars:26,consts:[[3,"title","subheader"],["class","mrg-b-4-bd","type","error",4,"ngIf"],["required","","data-test-id","select-umtausch-card-group",3,"ngModelChange","ngModel"],[1,"umtausch-grid"],["data-test-id","select-new-umtausch-card",3,"value"],[1,"vh-font-style-7","mb-2"],["data-test-id","select-existing-umtausch-card",3,"value"],[3,"abortButton","nextButton","buttonConfigs"],["type","error",1,"mrg-b-4-bd"]],template:function(i,o){i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),d(2,"translate"),l(3,"or-ui-transaktion-card"),y(4,zs,3,3,"vh-notification",1),l(5,"vh-selectable-card-group",2),St("ngModelChange",function(m){return vt(o.currentSelection,m)||(o.currentSelection=m),m}),l(6,"div",3)(7,"vh-selectable-card",4)(8,"div",5),_(9),d(10,"translate"),c(),l(11,"div"),_(12),d(13,"translate"),c()(),l(14,"vh-selectable-card",6)(15,"div",5),_(16),d(17,"translate"),c(),l(18,"div"),_(19),d(20,"translate"),c()()()()(),l(21,"or-ui-transaktion-button-group",7),b("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("nextButton",function(){return o.onChosen()}),c()()),i&2&&(p("title",f(1,11,"FONDS_UMTAUSCH_TITEL"))("subheader",De(2,13,"SELECT_NEW_OR_EXISTING_STEP__CATCH_PHRASE",he(24,Bs,o.model.fondsName))),a(4),p("ngIf",o.showNoSelectionOverlay),a(),Et("ngModel",o.currentSelection),a(2),p("value",o.UmtauschSteps.FONDS_UMTAUSCH_SEARCH),a(2),M(" ",f(10,16,"SELECT_NEW_OR_EXISTING_STEP__NEW_HEADLINE")," "),a(3),A(f(13,18,"SELECT_NEW_OR_EXISTING_STEP__NEW_TEXT")),a(2),p("value",o.UmtauschSteps.CHOOSE_EXISTING_FUND),a(2),M(" ",f(17,20,"SELECT_NEW_OR_EXISTING_STEP__EXISTING_HEADLINE")," "),a(3),A(f(20,22,"SELECT_NEW_OR_EXISTING_STEP__EXISTING_TEXT")),a(2),p("buttonConfigs",o.buttonConfigs))},dependencies:[X,Z,Be,No,nn,rn,en,it,Qt,Jt,q,Ne,Oe,ne,te,ee],styles:[".hide[_ngcontent-%COMP%]{display:none}.icon-attention-red[_ngcontent-%COMP%]{color:var(--color-group-35);font-size:20px}.form-control-error[_ngcontent-%COMP%]   i.icon.icon-attention-red[_ngcontent-%COMP%]{color:unset}.text-align-right[_ngcontent-%COMP%]{text-align:right}.text-align-center[_ngcontent-%COMP%]{text-align:center}.flow-text[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.headline[_ngcontent-%COMP%]{text-align:center}.h1-order[_ngcontent-%COMP%], .h2[_ngcontent-%COMP%], .h3[_ngcontent-%COMP%], .h4[_ngcontent-%COMP%]{margin-bottom:20px;font-weight:700}.h1-order[_ngcontent-%COMP%]{color:var(--color-group-1);font-family:var(--vh-font-family-1);font-weight:var(--vh-font-weight-1);text-transform:var(--vh-text-transform-1);font-size:var(--vh-font-size-1);line-height:var(--vh-line-height-1)}@media (min-width: 1440px){.h1-order[_ngcontent-%COMP%]{font-size:48px}}.h2-order-details-headline[_ngcontent-%COMP%]{color:var(--color-group-69);font-family:var(--vh-font-family-2);font-weight:var(--vh-font-weight-2);text-transform:var(--vh-text-transform-2);font-size:var(--vh-font-size-2);line-height:var(--vh-line-height-2)}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:20px}.margin-complete-component[_ngcontent-%COMP%]{margin:40px 0}.radio-seperator[_ngcontent-%COMP%]{margin:0 10px;color:var(--color-group-69);font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.document-downloaded[_ngcontent-%COMP%]{color:var(--color-group-33)}@media screen and (width <= 767px){.button[_ngcontent-%COMP%]{margin-left:0;margin-right:0}}.mrg-b-1-bd[_ngcontent-%COMP%]{margin-bottom:4px}.mrg-b-2-bd[_ngcontent-%COMP%]{margin-bottom:8px}.mrg-b-4-bd[_ngcontent-%COMP%]{margin-bottom:16px}.mrg-b-6-bd[_ngcontent-%COMP%]{margin-bottom:24px}.mrg-b-8-bd[_ngcontent-%COMP%]{margin-bottom:32px}.mrg-b-10-bd[_ngcontent-%COMP%]{margin-bottom:40px}.mrg-t-3-bd[_ngcontent-%COMP%]{margin-top:16px}.mrg-t-6-bd[_ngcontent-%COMP%]{margin-top:24px}.mrg-t-7-bd[_ngcontent-%COMP%]{margin-top:28px}.mrg-t-8-bd[_ngcontent-%COMP%]{margin-top:32px}.mrg-t-12-bd[_ngcontent-%COMP%]{margin-top:48px}.details-margin-top[_ngcontent-%COMP%]{margin-top:40px}.confirmation-subline[_ngcontent-%COMP%]{font-size:16px}.subline[_ngcontent-%COMP%]{text-align:center;font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.container-fluid[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px;max-width:1260px;margin-left:auto;margin-right:auto}@media (width >= 768px){.container-fluid[_ngcontent-%COMP%]{padding-left:30px;padding-right:30px}}main[_ngcontent-%COMP%]{min-height:calc(100vh - 200px)}.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:8px}@media (min-width: 768px){.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:16px}}.margin-labeled-content[_ngcontent-%COMP%]:last-child{margin-bottom:0}.mt-between-boxes[_ngcontent-%COMP%]{margin-top:24px}@media (width >= 768px){.mt-between-boxes[_ngcontent-%COMP%]{margin-top:30px}}.button-group[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}@media (width <= 576px){.button-group[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.umtausch-grid[_ngcontent-%COMP%]{display:grid;grid-auto-rows:1fr;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));grid-gap:24px}"]});let e=t;return e})();var lt=function(e){return e.UMTAUSCH="Umtausch",e.VERKAUF_KAUF="Verkauf/Kauf",e}(lt||{});var ea=(()=>{let t=class t{constructor(n){this.http=n,this.URL="/portfolio-functional-service"}searchFunds$(n,i,o,s,m,S){let g=`${this.URL}/fundsearch`,E=new Qn().set("maxResults",i.toString()).set("unionOnly",o.toString()).set("excludeEtfs",s.toString()).set("vlDepot",S.valueOf()).set("searchTerm",n);return m&&(E=E.set("productType",m)),this.http.get(g,{params:E})}};t.\u0275fac=function(i){return new(i||t)(h(ae))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var re=function(e){return e.FEHLENDE_VERKAUFSUNTERLAGEN="FEHLENDE_VERKAUFSUNTERLAGEN",e.FEHLENDE_ZIELMARKTINFORMATIONEN="FEHLENDE_ZIELMARKTINFORMATIONEN",e.TECHNISCHER_FEHLER="TECHNISCHER_FEHLER",e.ERFOLG="ERFOLG",e}(re||{}),mi=(e,t)=>{if(e)return{name:e.name,isin:e.isin,ausgabePreis:{betrag:e.preis?.betrag,waehrung:e.preis?.waehrung,datum:e.preis?.datum},priceDatePlus:e.priceDatePlus,kvg:e.kvgName,ausgabeAufschlag:e.ausgabeAufschlag,anlagezielName:void 0,bestandWert:void 0,showAnlagezielName:!1,showAusgabeaufschlag:t,showBestandWert:!1,showUnterdepotNummer:!1,unterdepotNummer:void 0,istSparplanMoeglich:e.istSparplanMoeglich,ausgabePreisBeinhaltetAusgabeaufschlag:e.ausgabePreisBeinhaltetAusgabeaufschlag,showAnzahlStuecke:!1}},Tt=function(e){return e.PUBLIC_FOND_OFFEN="A",e.ETF="E",e.ETC="Y",e.ELTIF="EL",e.FREMDFOND="F",e.PRIVATE_LABEL_FONDS="L",e.PROVISIONSFREI="0",e.OTHER="OTHER",e}(Tt||{}),ir=function(e){return e.ETC="ETC",e.ETF="ETF",e}(ir||{}),ta=e=>{switch(e){case"A":return Tt.PUBLIC_FOND_OFFEN;case"E":return Tt.ETF;case"Y":return Tt.ETC;case"EL":return Tt.ELTIF;case"F":return Tt.FREMDFOND;case"L":return Tt.PRIVATE_LABEL_FONDS;case"0":return Tt.PROVISIONSFREI;default:return Tt.OTHER}};var rr=e=>{switch(e){case"ETF_FREMDFONDS":return ir.ETF;case"ETC_FREMDFONDS":return ir.ETC;default:return}};var yn=(()=>{let t=class t{constructor(n){this.productType=n}};t.type="[FeatureToggles] ordering load feature toggles";let e=t;return e})();var fi,Gs="ordering_bestand_feature_toggles",je,Ee=(je=class{constructor(t){this.configurationProvider=t}static getFeatureToggleValue(t){return _e([fi],r=>r[t])}static getFeatureToggleValues(t=[]){return _e([fi],r=>t.reduce((n,i)=>(n[i]=r[i],n),{}))}load({setState:t},{productType:r}){return this.configurationProvider.getFeatureToggles$(r).pipe(oe(1),N(n=>{t(()=>n)}))}},fi=je,je.\u0275fac=function(r){return new(r||je)(h(ui))},je.\u0275prov=C({token:je,factory:je.\u0275fac}),je);I([J(yn),u("design:type",Function),u("design:paramtypes",[Object,yn]),u("design:returntype",j)],Ee.prototype,"load",null);Ee=fi=I([le({name:Gs}),u("design:paramtypes",[Object])],Ee);var It=(()=>{let t=class t{constructor(n){this.depotIndex=n}};t.type="[Depot] ordering load state with toggles";let e=t;return e})();var gi=203,ln=(()=>{let t=class t{constructor(){this.daskaOfflineSubject=new et(!1)}registerDaskaOfflineResponse(n){$s.includes(n)&&this.daskaOfflineSubject.next(!0)}isDaskaOffline$(){return this.daskaOfflineSubject.asObservable()}isDaskaOffline(){return this.daskaOfflineSubject.getValue()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),z=function(e){return e[e.ANLAGEZIEL_FS_ANLAGEZIEL=0]="ANLAGEZIEL_FS_ANLAGEZIEL",e[e.ANLAGEZIEL_FS_ANLAGEZIEL_AGGREGATION=1]="ANLAGEZIEL_FS_ANLAGEZIEL_AGGREGATION",e[e.ANLAGEZIEL_FS_ANLAGEZIEL_HISTORY=2]="ANLAGEZIEL_FS_ANLAGEZIEL_HISTORY",e[e.ANLAGEZIEL_FS_ANLAGEZIEL_LEGAL_HINTS=3]="ANLAGEZIEL_FS_ANLAGEZIEL_LEGAL_HINTS",e[e.ANLAGEZIEL_FS_ANLAGEZIEL_PAYOUTPLANS=4]="ANLAGEZIEL_FS_ANLAGEZIEL_PAYOUTPLANS",e[e.ANLAGEZIEL_FS_ANLAGEZIEL_PERFORMANCE=5]="ANLAGEZIEL_FS_ANLAGEZIEL_PERFORMANCE",e[e.ANLAGEZIEL_FS_ANLAGEZIEL_SPERREN=6]="ANLAGEZIEL_FS_ANLAGEZIEL_SPERREN",e[e.ANLAGEZIEL_FS_ANLAGEZIEL_FONDS=7]="ANLAGEZIEL_FS_ANLAGEZIEL_FONDS",e[e.ANLAGEZIEL_FS_VERTRAGS_DETAILS=8]="ANLAGEZIEL_FS_VERTRAGS_DETAILS",e[e.ANLAGEZIEL_FS_ANLAGEZIELE=9]="ANLAGEZIEL_FS_ANLAGEZIELE",e[e.ANLAGEZIEL_FS_DEPOT=10]="ANLAGEZIEL_FS_DEPOT",e[e.ANLAGEZIEL_FS_DEPOT_PAYOUTPLANS=11]="ANLAGEZIEL_FS_DEPOT_PAYOUTPLANS",e[e.ANLAGEZIEL_FS_DEPOT_PERFORMANCE=12]="ANLAGEZIEL_FS_DEPOT_PERFORMANCE",e[e.ANLAGEZIEL_FS_DEPOT_SAVINGSPLANS=13]="ANLAGEZIEL_FS_DEPOT_SAVINGSPLANS",e[e.ANLAGEZIEL_FS_FEASIBILITY=14]="ANLAGEZIEL_FS_FEASIBILITY",e[e.ANLAGEZIEL_FS_BESTANDSDETAILS=15]="ANLAGEZIEL_FS_BESTANDSDETAILS",e[e.CUSTOMER_FS_BANK_ACCOUNTS=16]="CUSTOMER_FS_BANK_ACCOUNTS",e}(z||{}),$s=[z.ANLAGEZIEL_FS_ANLAGEZIEL,z.ANLAGEZIEL_FS_ANLAGEZIEL_AGGREGATION,z.ANLAGEZIEL_FS_ANLAGEZIEL_HISTORY,z.ANLAGEZIEL_FS_ANLAGEZIEL_LEGAL_HINTS,z.ANLAGEZIEL_FS_ANLAGEZIEL_PAYOUTPLANS,z.ANLAGEZIEL_FS_ANLAGEZIEL_PERFORMANCE,z.ANLAGEZIEL_FS_ANLAGEZIEL_SPERREN,z.ANLAGEZIEL_FS_ANLAGEZIELE,z.ANLAGEZIEL_FS_DEPOT,z.ANLAGEZIEL_FS_DEPOT_PAYOUTPLANS,z.ANLAGEZIEL_FS_DEPOT_PERFORMANCE,z.ANLAGEZIEL_FS_DEPOT_SAVINGSPLANS,z.ANLAGEZIEL_FS_FEASIBILITY,z.ANLAGEZIEL_FS_VERTRAGS_DETAILS,z.CUSTOMER_FS_BANK_ACCOUNTS];var Ks=new Jn({Accept:"application/vv.depot.v3+json"}),ve=(()=>{let t=class t{constructor(n,i,o,s){this.clientErrorHandler=n,this.depotIndexService=i,this.http=o,this.offlineService=s,this.URL="/anlageziel-functional-service"}getDepot$(n){let i=`${this.URL}/depot/${n}`;return this.http.get(i,{observe:"response",headers:Ks}).pipe(v(o=>(this.registerHttpStatus(o.status,z.ANLAGEZIEL_FS_DEPOT),o.body)))}getLegalHints$(n){let i=this.buildUrl(`${this.URL}/depot/%depotIndex%/anlageziel/%anlagezielId%/legalhints`,{anlagezielId:n});return this.http.get(i,{observe:"response"}).pipe(k(o=>o.status===404?Q(()=>new ar("Anlageziel wurde nicht gefunden",i)):Q(()=>new sr(i))),v(o=>(this.registerHttpStatus(o.status,z.ANLAGEZIEL_FS_ANLAGEZIEL_LEGAL_HINTS),o.body)))}getAnlagezieleSparplaene$(){let n=this.buildUrl(`${this.URL}/depot/%depotIndex%/savingsplans?draftSavingsPlan=true`,{});return this.getRequestWithErrorHandling(n,z.ANLAGEZIEL_FS_DEPOT_SAVINGSPLANS,!1)}getRequestWithErrorHandling(n,i,o=!0){return this.http.get(n,{observe:"response"}).pipe(v(s=>(this.registerHttpStatus(s.status,i),s.body)),k(s=>this.handleError(s,o)))}getAnlagezieleAuszahlplaene$(){let n=this.buildUrl(`${this.URL}/depot/%depotIndex%/payoutplans`,{});return this.getRequestWithErrorHandling(n,z.ANLAGEZIEL_FS_DEPOT_PAYOUTPLANS,!1)}getSingleAnlagezielAuszahlplan$(n){let i=this.buildUrl(`${this.URL}/depot/%depotIndex%/anlageziel/%anlagezielId%/payoutplans`,{anlagezielId:n});return this.getRequestWithErrorHandling(i,z.ANLAGEZIEL_FS_ANLAGEZIEL_PAYOUTPLANS,!1)}buildUrl(n,i){let o=this.depotIndexService.getDepotIndex();return n.replace("%depotIndex%",o).replace("%anlagezielId%",i.anlagezielId)}registerHttpStatus(n,i){n===gi&&this.offlineService.registerDaskaOfflineResponse(i)}handleError(n,i){return i&&n.status!==409&&this.clientErrorHandler.handleClientError(n),Q(()=>n)}};t.\u0275fac=function(i){return new(i||t)(h(Vo),h(ce),h(ae),h(ln))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),hi=class{constructor(t,r){this.art=t,this.url=r}},ar=class extends hi{constructor(t,r){super(lr.FACHLICH,r),this.beschreibung=t}},sr=class extends hi{constructor(t){super(lr.TECHNISCH,t)}},lr=function(e){return e[e.TECHNISCH=0]="TECHNISCH",e[e.FACHLICH=1]="FACHLICH",e}(lr||{});var pe=class{constructor(){this.status=new Map}static forDepotIndexUnawareState(){return new dr}executeRequest(t,r,n){let i=this.status.get(t);return i||(i=new cr,this.status.set(t,i)),i.executeRequest(r,n)}invalidate(t){this.status.delete(t)}invalidateAll(){this.status.clear()}},cr=class{constructor(){this.lastRequestTimestamp=null,this.request=F(void 0)}requestPerformed(){this.lastRequestTimestamp=Date.now()}executeRequest(t,r){return t?.isReloadRequired(this.lastRequestTimestamp)&&(this.requestPerformed(),this.request=r.pipe(Wn(1))),this.request}},se=class e{static always(){return{isReloadRequired:()=>!0}}static whenSecondsPassedSinceLast(t){return t<=0?e.always():new pr(t)}static onlyOnce(){return new ur}},pr=class{constructor(t){this.reloadAfter=t}isReloadRequired(t){return t?(Date.now()-t)/1e3>this.reloadAfter:!0}},ur=class{isReloadRequired(t){return!t}},dr=class{constructor(){this.requestManager=new pe}executeRequest(t,r,n){return this.previousDepotIdx!==t&&this.previousDepotIdx&&this.requestManager.invalidate(this.previousDepotIdx),this.previousDepotIdx=t,this.requestManager.executeRequest(t,r,n)}invalidate(t){this.requestManager.invalidate(t)}};var js="ordering_bestand_depot",na={productType:null,depotType:null,betrag:void 0,validierungen:void 0},ct,Ce=(ct=class{constructor(t){this.anlagezielService=t,this.requestManager=pe.forDepotIndexUnawareState()}static getDepotType(t){return t.depotType}static getProductType(t){return t.productType}static neukaufEinmalZahlungValidierungen(t){return t.validierungen?.neukaufEinmalig.startDatum}static ansparplanAusfuehrungValidierungen(t){return t.validierungen?.neukaufSparplan.startDatum}static ansparplanEndDateValidierungen(t){return t.validierungen?.neukaufSparplan.endeDatum}loadDepotWithToggles(t,{depotIndex:r}){let n=()=>t.setState(na),i=F(null).pipe(N(n)),o=this.anlagezielService.getDepot$(r).pipe(N(s=>{t.setState(()=>({depotType:s.eigenschaften.typ,productType:s.eigenschaften.klasse,betrag:{zukuenftigerWert:s.betrag?.zukuenftigerWert,aktuellerWert:s.betrag?.aktuellerWert},validierungen:s.validierungen}))}),de(s=>t.dispatch(new yn(s.eigenschaften.klasse))));return this.requestManager.executeRequest(r,se.always(),jn(i,o))}},ct.\u0275fac=function(r){return new(r||ct)(h(ve))},ct.\u0275prov=C({token:ct,factory:ct.\u0275fac}),ct);I([J(It),u("design:type",Function),u("design:paramtypes",[Object,It]),u("design:returntype",j)],Ce.prototype,"loadDepotWithToggles",null);I([V(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",String)],Ce,"getDepotType",null);I([V(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",String)],Ce,"getProductType",null);I([V(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Object)],Ce,"neukaufEinmalZahlungValidierungen",null);I([V(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Object)],Ce,"ansparplanAusfuehrungValidierungen",null);I([V(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Object)],Ce,"ansparplanEndDateValidierungen",null);Ce=I([le({name:js,defaults:na}),u("design:paramtypes",[ve])],Ce);var Ei=(()=>{let t=class t{constructor(n){this.http=n,this.URL="/portfolio-functional-service"}isPurchasable$(n){return this.http.get(`${this.URL}/funds/${n}/purchase-info`).pipe(v(i=>i.purchasable),k(()=>Q(()=>new ye)))}};t.\u0275fac=function(i){return new(i||t)(h(ae))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Mn=(()=>{let t=class t{constructor(n){this.isin=n}};t.type="[LoadSalesDocuments] ordering load state";let e=t;return e})();function Ge(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function cn(e){return!!e&&!!e[B]}function Ot(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===nl}(e)||Array.isArray(e)||!!e[ca]||!!(!((t=e.constructor)===null||t===void 0)&&t[ca])||Cr(e)||Tr(e))}function pn(e,t,r){r===void 0&&(r=!1),un(e)===0?(r?Object.keys:Ar)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function un(e){var t=e[B];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Cr(e)?2:Tr(e)?3:0}function _r(e,t){return un(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ws(e,t){return un(e)===2?e.get(t):e[t]}function pa(e,t,r){var n=un(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Xs(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Cr(e){return el&&e instanceof Map}function Tr(e){return tl&&e instanceof Set}function ue(e){return e.o||e.t}function Ir(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=il(e);delete t[B];for(var r=Ar(t),n=0;n<r.length;n++){var i=r[n],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function br(e,t){return t===void 0&&(t=!1),Or(e)||cn(e)||!Ot(e)||(un(e)>1&&(e.set=e.add=e.clear=e.delete=qs),Object.freeze(e),t&&pn(e,function(r,n){return br(n,!0)},!0)),e}function qs(){Ge(2)}function Or(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function pt(e){var t=vr[e];return t||Ge(18,e),t}function Ys(e,t){vr[e]||(vr[e]=t)}function Si(){return Pn}function mr(e,t){t&&(pt("Patches"),e.u=[],e.s=[],e.v=t)}function Ci(e){Er(e),e.p.forEach(Js),e.p=null}function Er(e){e===Pn&&(Pn=e.l)}function ia(e){return Pn={p:[],l:Pn,h:e,m:!0,_:0}}function Js(e){var t=e[B];t.i===0||t.i===1?t.j():t.g=!0}function fr(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||pt("ES5").S(t,e,n),n?(r[B].P&&(Ci(t),Ge(4)),Ot(e)&&(e=Ti(t,e),t.l||Ii(t,e)),t.u&&pt("Patches").M(r[B].t,e,t.u,t.s)):e=Ti(t,r,[]),Ci(t),t.u&&t.v(t.u,t.s),e!==da?e:void 0}function Ti(e,t,r){if(Or(t))return t;var n=t[B];if(!n)return pn(t,function(m,S){return ra(e,n,t,m,S,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Ii(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Ir(n.k):n.o,o=i,s=!1;n.i===3&&(o=new Set(i),i.clear(),s=!0),pn(o,function(m,S){return ra(e,n,i,m,S,r,s)}),Ii(e,i,!1),r&&e.u&&pt("Patches").N(n,r,e.u,e.s)}return n.o}function ra(e,t,r,n,i,o,s){if(cn(i)){var m=Ti(e,i,o&&t&&t.i!==3&&!_r(t.R,n)?o.concat(n):void 0);if(pa(r,n,m),!cn(m))return;e.m=!1}else s&&r.add(i);if(Ot(i)&&!Or(i)){if(!e.h.D&&e._<1)return;Ti(e,i),t&&t.A.l||Ii(e,i)}}function Ii(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&br(t,r)}function gr(e,t){var r=e[B];return(r?ue(r):e)[t]}function oa(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function bt(e){e.P||(e.P=!0,e.l&&bt(e.l))}function hr(e){e.o||(e.o=Ir(e.t))}function Fn(e,t,r){var n=Cr(t)?pt("MapSet").F(t,r):Tr(t)?pt("MapSet").T(t,r):e.O?function(i,o){var s=Array.isArray(i),m={i:s?1:0,A:o?o.A:Si(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},S=m,g=Sr;s&&(S=[m],g=xn);var E=Proxy.revocable(S,g),w=E.revoke,H=E.proxy;return m.k=H,m.j=w,H}(t,r):pt("ES5").J(t,r);return(r?r.A:Si()).p.push(n),n}function Qs(e){return cn(e)||Ge(22,e),function t(r){if(!Ot(r))return r;var n,i=r[B],o=un(r);if(i){if(!i.P&&(i.i<4||!pt("ES5").K(i)))return i.t;i.I=!0,n=aa(r,o),i.I=!1}else n=aa(r,o);return pn(n,function(s,m){i&&Ws(i.t,s)===m||pa(n,s,t(m))}),o===3?new Set(n):n}(e)}function aa(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ir(e)}function ua(){function e(m,S){function g(){this.constructor=m}i(m,S),m.prototype=(g.prototype=S.prototype,new g)}function t(m){m.o||(m.R=new Map,m.o=new Map(m.t))}function r(m){m.o||(m.o=new Set,m.t.forEach(function(S){if(Ot(S)){var g=Fn(m.A.h,S,m);m.p.set(S,g),m.o.add(g)}else m.o.add(S)}))}function n(m){m.g&&Ge(3,JSON.stringify(ue(m)))}var i=function(m,S){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,E){g.__proto__=E}||function(g,E){for(var w in E)E.hasOwnProperty(w)&&(g[w]=E[w])})(m,S)},o=function(){function m(g,E){return this[B]={i:2,l:E,A:E?E.A:Si(),P:!1,I:!1,o:void 0,R:void 0,t:g,k:this,C:!1,g:!1},this}e(m,Map);var S=m.prototype;return Object.defineProperty(S,"size",{get:function(){return ue(this[B]).size}}),S.has=function(g){return ue(this[B]).has(g)},S.set=function(g,E){var w=this[B];return n(w),ue(w).has(g)&&ue(w).get(g)===E||(t(w),bt(w),w.R.set(g,!0),w.o.set(g,E),w.R.set(g,!0)),this},S.delete=function(g){if(!this.has(g))return!1;var E=this[B];return n(E),t(E),bt(E),E.t.has(g)?E.R.set(g,!1):E.R.delete(g),E.o.delete(g),!0},S.clear=function(){var g=this[B];n(g),ue(g).size&&(t(g),bt(g),g.R=new Map,pn(g.t,function(E){g.R.set(E,!1)}),g.o.clear())},S.forEach=function(g,E){var w=this;ue(this[B]).forEach(function(H,_t){g.call(E,w.get(_t),_t,w)})},S.get=function(g){var E=this[B];n(E);var w=ue(E).get(g);if(E.I||!Ot(w)||w!==E.t.get(g))return w;var H=Fn(E.A.h,w,E);return t(E),E.o.set(g,H),H},S.keys=function(){return ue(this[B]).keys()},S.values=function(){var g,E=this,w=this.keys();return(g={})[vi]=function(){return E.values()},g.next=function(){var H=w.next();return H.done?H:{done:!1,value:E.get(H.value)}},g},S.entries=function(){var g,E=this,w=this.keys();return(g={})[vi]=function(){return E.entries()},g.next=function(){var H=w.next();if(H.done)return H;var _t=E.get(H.value);return{done:!1,value:[H.value,_t]}},g},S[vi]=function(){return this.entries()},m}(),s=function(){function m(g,E){return this[B]={i:3,l:E,A:E?E.A:Si(),P:!1,I:!1,o:void 0,t:g,k:this,p:new Map,g:!1,C:!1},this}e(m,Set);var S=m.prototype;return Object.defineProperty(S,"size",{get:function(){return ue(this[B]).size}}),S.has=function(g){var E=this[B];return n(E),E.o?!!E.o.has(g)||!(!E.p.has(g)||!E.o.has(E.p.get(g))):E.t.has(g)},S.add=function(g){var E=this[B];return n(E),this.has(g)||(r(E),bt(E),E.o.add(g)),this},S.delete=function(g){if(!this.has(g))return!1;var E=this[B];return n(E),r(E),bt(E),E.o.delete(g)||!!E.p.has(g)&&E.o.delete(E.p.get(g))},S.clear=function(){var g=this[B];n(g),ue(g).size&&(r(g),bt(g),g.o.clear())},S.values=function(){var g=this[B];return n(g),r(g),g.o.values()},S.entries=function(){var g=this[B];return n(g),r(g),g.o.entries()},S.keys=function(){return this.values()},S[vi]=function(){return this.values()},S.forEach=function(g,E){for(var w=this.values(),H=w.next();!H.done;)g.call(E,H.value,H.value,this),H=w.next()},m}();Ys("MapSet",{F:function(m,S){return new o(m,S)},T:function(m,S){return new s(m,S)}})}var sa,Pn,Nr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",el=typeof Map<"u",tl=typeof Set<"u",la=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",da=Nr?Symbol.for("immer-nothing"):((sa={})["immer-nothing"]=!0,sa),ca=Nr?Symbol.for("immer-draftable"):"__$immer_draftable",B=Nr?Symbol.for("immer-state"):"__$immer_state",vi=typeof Symbol<"u"&&Symbol.iterator||"@@iterator";var nl=""+Object.prototype.constructor,Ar=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,il=Object.getOwnPropertyDescriptors||function(e){var t={};return Ar(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},vr={},Sr={get:function(e,t){if(t===B)return e;var r=ue(e);if(!_r(r,t))return function(i,o,s){var m,S=oa(o,s);return S?"value"in S?S.value:(m=S.get)===null||m===void 0?void 0:m.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!Ot(n)?n:n===gr(e.t,t)?(hr(e),e.o[t]=Fn(e.A.h,n,e)):n},has:function(e,t){return t in ue(e)},ownKeys:function(e){return Reflect.ownKeys(ue(e))},set:function(e,t,r){var n=oa(ue(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=gr(ue(e),t),o=i?.[B];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Xs(r,i)&&(r!==void 0||_r(e.t,t)))return!0;hr(e),bt(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return gr(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,hr(e),bt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=ue(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){Ge(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ge(12)}},xn={};pn(Sr,function(e,t){xn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),xn.deleteProperty=function(e,t){return xn.set.call(this,e,t,void 0)},xn.set=function(e,t,r){return Sr.set.call(this,e[0],t,r,e[0])};var rl=function(){function e(r){var n=this;this.O=la,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var m=o;o=i;var S=n;return function(kt){var Fs=this;kt===void 0&&(kt=m);for(var Ji=arguments.length,eo=Array(Ji>1?Ji-1:0),Kn=1;Kn<Ji;Kn++)eo[Kn-1]=arguments[Kn];return S.produce(kt,function(Ps){var to;return(to=o).call.apply(to,[Fs,Ps].concat(eo))})}}var g;if(typeof o!="function"&&Ge(6),s!==void 0&&typeof s!="function"&&Ge(7),Ot(i)){var E=ia(n),w=Fn(n,i,void 0),H=!0;try{g=o(w),H=!1}finally{H?Ci(E):Er(E)}return typeof Promise<"u"&&g instanceof Promise?g.then(function(kt){return mr(E,s),fr(kt,E)},function(kt){throw Ci(E),kt}):(mr(E,s),fr(g,E))}if(!i||typeof i!="object"){if((g=o(i))===void 0&&(g=i),g===da&&(g=void 0),n.D&&br(g,!0),s){var _t=[],Qr=[];pt("Patches").M(i,g,_t,Qr),s(_t,Qr)}return g}Ge(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(g){for(var E=arguments.length,w=Array(E>1?E-1:0),H=1;H<E;H++)w[H-1]=arguments[H];return n.produceWithPatches(g,function(_t){return i.apply(void 0,[_t].concat(w))})};var s,m,S=n.produce(i,o,function(g,E){s=g,m=E});return typeof Promise<"u"&&S instanceof Promise?S.then(function(g){return[g,s,m]}):[S,s,m]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Ot(r)||Ge(8),cn(r)&&(r=Qs(r));var n=ia(this),i=Fn(this,r,void 0);return i[B].C=!0,Er(n),i},t.finishDraft=function(r,n){var i=r&&r[B],o=i.A;return mr(o,n),fr(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!la&&Ge(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var s=pt("Patches").$;return cn(r)?s(r,n):this.produce(r,function(m){return s(m,n)})},e}(),ke=new rl,fe=ke.produce,Ju=ke.produceWithPatches.bind(ke),Qu=ke.setAutoFreeze.bind(ke),ed=ke.setUseProxies.bind(ke),td=ke.applyPatches.bind(ke),nd=ke.createDraft.bind(ke),id=ke.finishDraft.bind(ke),yr=fe;var bi,ol="ordering_bestand_sales_documents",Ze,Rn=(Ze=class{constructor(t){this.portfolioService=t,this.pendingCalls=new Map}static hasMissingSalesDocumentsFor(t){return _e([bi],r=>t?r.salesDocumentsMissing.get(t):!1)}static isPurchasable(t){return _e([bi.hasMissingSalesDocumentsFor(t)],r=>!r)}loadSalesDocumentsMissing$({setState:t,getState:r},{isin:n}){if(!n||r().salesDocumentsMissing.has(n))return F(void 0);let i=this.pendingCalls.get(n);if(i)return i;let o=new Te;return this.pendingCalls.set(n,o),this.portfolioService.isPurchasable$(n).pipe(N(s=>{let m=!s;t(fe(S=>{S.salesDocumentsMissing.set(n,m)})),o.next(),o.complete()}),k(()=>(t(fe(s=>{s.salesDocumentsMissing.set(n,null)})),o.error(new ye),Q(()=>new ye))),xt(()=>{this.pendingCalls.delete(n)}))}},bi=Ze,Ze.\u0275fac=function(r){return new(r||Ze)(h(Ei))},Ze.\u0275prov=C({token:Ze,factory:Ze.\u0275fac}),Ze);I([J(Mn),u("design:type",Function),u("design:paramtypes",[Object,Mn]),u("design:returntype",j)],Rn.prototype,"loadSalesDocumentsMissing$",null);Rn=bi=I([le({name:ol,defaults:{salesDocumentsMissing:new Map}}),u("design:paramtypes",[Ei])],Rn);var $t=(()=>{let t=class t{constructor(n){this.depotIndex=n}};t.type="[Unterdepots] ordering load Unterdepots for Stammdepot";let e=t;return e})(),Dn=(()=>{let t=class t{constructor(n,i){this.depotIndex=n,this.unterdepotID=i}};t.type="[Unterdepots] ordering load Unterdepot for Stammdepot";let e=t;return e})(),Mr=(()=>{let t=class t{constructor(n,i){this.depotIndex=n,this.unterdepotID=i}};t.type="[Unterdepots] ordering load Vertragsdaten for Unterdepot";let e=t;return e})(),xr=(()=>{let t=class t{constructor(n,i){this.depotIndex=n,this.unterdepotID=i}};t.type="[Unterdepots] ordering load Wealth for Unterdepot";let e=t;return e})();var ma=new Jn({Accept:"application/vv.anlageziel.v3+json"}),Oi=(()=>{let t=class t{constructor(n,i){this.http=n,this.daskaOfflineService=i,this.SERVICE_URL="/anlageziel-functional-service"}getAnlageziele(n){let i=`${this.SERVICE_URL}/depot/${n}/anlageziel`;return this.httpGet(z.ANLAGEZIEL_FS_ANLAGEZIELE,i,ma)}getAnlageziel(n,i){let o=this.urlWithDepotAndSubdepot(n,i);return this.httpGet(z.ANLAGEZIEL_FS_ANLAGEZIEL,o,ma)}getVertragsdaten$(n,i){let o=`${this.urlWithDepotAndSubdepot(n,i)}/contract-data`;return this.httpGet(z.ANLAGEZIEL_FS_VERTRAGS_DETAILS,o).pipe(v(s=>s.body?al(s.body):null),Ue(s=>!!s))}getAnlagezielVermoegen$(n,i){let o=`${this.urlWithDepotAndSubdepot(n,i)}/history`;return this.httpGet(z.ANLAGEZIEL_FS_ANLAGEZIEL_HISTORY,o).pipe(v(s=>s.body))}httpGet(n,i,o){return this.http.get(i,{observe:"response",headers:o}).pipe(N(s=>{s.status===gi&&this.daskaOfflineService.registerDaskaOfflineResponse(n)}))}urlWithDepotAndSubdepot(n,i){return`${this.SERVICE_URL}/depot/${n}/anlageziel/${i}`}};t.\u0275fac=function(i){return new(i||t)(h(ae),h(ln))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),al=e=>{let t=new Map;return Object.entries(e).forEach(([r,n])=>t.set(r,n)),t};var Ln=function(e){return e.AKTIV="AKTIV",e.IN_AUFLOESUNG="IN_AUFLOESUNG",e.ENTWURF="ENTWURF",e.AUFGELOEST="AUFGELOEST",e}(Ln||{}),Ni=function(e){return e.EINZELFONDS="EINZELFONDS",e.RIESTER="RIESTER",e.VL="VL",e}(Ni||{});var ll="ordering_bestand_unterdepots",ut,L=(ut=class{constructor(t){this.anlagezielV3Client=t,this.anlagezieleRequestManager=new pe,this.anlagezielRequestManager=new pe}static alleUnterdepotsProStammdepot(t){return r=>{let n=t.unterdepots.get(r);return n||(n=void 0),n}}static alleNonVlRiesterUnterdepotIdsProStammdepotUndIsin(t){return(r,n)=>t(r)?.filter(i=>i.produkt.einzelfonds?.isin===n).filter(i=>i.produkt.eigenschaften?.sonderauspraegung!==Ni.RIESTER).filter(i=>i.produkt.eigenschaften?.sonderauspraegung!==Ni.VL).map(i=>i.keys.id)??[]}static isKomplettverkaufPossible(t){return r=>{let n=t(r);if(n!=null){let i=n?.produkt?.eigenschaften?.sonderauspraegung;return i!=="RIESTER"&&i!=="VL"}return!1}}static getWertpapierTyp(t){return r=>{let n=t(r)?.fondsart;return rr(n)}}static isEtfOrEtcProUnterdepotId(t){return r=>{let n=t(r)?.fondsart;return!!rr(n)}}static unterdepotsProID(t){let r=t.unterdepots.values(),n=new Map;for(let i of r)i.forEach(o=>n.set(o.keys.id,o));return i=>n.get(i)}static orderKennzeichenFuerUnterdepot(t){return r=>t(r).orderKennzeichen}static volljaehrigkeitsSperreFuerUnterdepot(t){return r=>t(r).volljaehrigkeitssperreStatus}static vertragsdatenEndeDatumProUnterdepotID(t){return r=>{let n=t(r)?.get("VL_DATUM_BIS");return n?new Date(n):void 0}}static vertragsdatenProUnterdepotID(t){return r=>t.vertragsdaten.get(r)}static vermoegenProUnterdepotID(t){return r=>t.vermoegen.get(r)}ladeUnterdepots$(t,r){let n=this.anlagezielV3Client.getAnlageziele(r.depotIndex).pipe(N(({body:i})=>{i&&t.setState(fe(o=>{o.unterdepots.set(r.depotIndex,i.map(ul))}))}),k(()=>Q(()=>new ye)));return this.anlagezieleRequestManager.executeRequest(r.depotIndex,se.always(),n)}ladeUnterdepot$(t,r){let n=this.anlagezielV3Client.getAnlageziel(r.depotIndex,r.unterdepotID).pipe(N(i=>{if(i.body){let o=ge({},i.body);t.setState(fe(s=>{pl(s,o,r.depotIndex)}))}}),k(()=>Q(()=>new ye)));return this.anlagezielRequestManager.executeRequest(r.unterdepotID,se.always(),n)}ladeVertragsDaten(t,r){let n=this.anlagezielV3Client.getVertragsdaten$(r.depotIndex,r.unterdepotID).pipe(N(i=>{t.setState(fe(o=>{o.vertragsdaten.set(r.unterdepotID,i)}))}),k(()=>Q(()=>new ye)));return this.anlagezielRequestManager.executeRequest(r.unterdepotID,se.always(),n)}ladeVermoegen(t,r){let n=this.anlagezielV3Client.getAnlagezielVermoegen$(r.depotIndex,r.unterdepotID).pipe(N(i=>{t.setState(fe(o=>{o.vermoegen.set(r.unterdepotID,i)}))}),k(()=>Q(()=>new ye)));return this.anlagezielRequestManager.executeRequest(r.unterdepotID,se.always(),n)}},ut.\u0275fac=function(r){return new(r||ut)(h(Oi))},ut.\u0275prov=C({token:ut,factory:ut.\u0275fac}),ut);I([J($t),u("design:type",Function),u("design:paramtypes",[Object,$t]),u("design:returntype",j)],L.prototype,"ladeUnterdepots$",null);I([J(Dn),u("design:type",Function),u("design:paramtypes",[Object,Dn]),u("design:returntype",j)],L.prototype,"ladeUnterdepot$",null);I([J(Mr),u("design:type",Function),u("design:paramtypes",[Object,Mr]),u("design:returntype",j)],L.prototype,"ladeVertragsDaten",null);I([J(xr),u("design:type",Function),u("design:paramtypes",[Object,xr]),u("design:returntype",j)],L.prototype,"ladeVermoegen",null);I([V([L]),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Function)],L,"alleUnterdepotsProStammdepot",null);I([V([L.alleUnterdepotsProStammdepot]),u("design:type",Function),u("design:paramtypes",[Function]),u("design:returntype",Function)],L,"alleNonVlRiesterUnterdepotIdsProStammdepotUndIsin",null);I([V([L.unterdepotsProID]),u("design:type",Function),u("design:paramtypes",[Function]),u("design:returntype",Function)],L,"isKomplettverkaufPossible",null);I([V([L.unterdepotsProID]),u("design:type",Function),u("design:paramtypes",[Function]),u("design:returntype",Function)],L,"getWertpapierTyp",null);I([V([L.unterdepotsProID]),u("design:type",Function),u("design:paramtypes",[Function]),u("design:returntype",Function)],L,"isEtfOrEtcProUnterdepotId",null);I([V([L]),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Function)],L,"unterdepotsProID",null);I([V([L.unterdepotsProID]),u("design:type",Function),u("design:paramtypes",[Function]),u("design:returntype",Function)],L,"orderKennzeichenFuerUnterdepot",null);I([V([L.unterdepotsProID]),u("design:type",Function),u("design:paramtypes",[Function]),u("design:returntype",Function)],L,"volljaehrigkeitsSperreFuerUnterdepot",null);I([V([L.vertragsdatenProUnterdepotID]),u("design:type",Function),u("design:paramtypes",[Function]),u("design:returntype",Function)],L,"vertragsdatenEndeDatumProUnterdepotID",null);I([V([L]),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Function)],L,"vertragsdatenProUnterdepotID",null);I([V([L]),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Function)],L,"vermoegenProUnterdepotID",null);L=I([le({name:ll,defaults:{unterdepots:new Map,vertragsdaten:new Map,vermoegen:new Map}}),u("design:paramtypes",[Oi])],L);var cl=(e,t)=>{let r=e.find(n=>n.keys.id===t.keys.id);r?e[e.indexOf(r)]=t:e.push(t)},pl=(e,t,r)=>{e.unterdepots.has(r)||e.unterdepots.set(r,[]);let n=e.unterdepots.get(r);n&&cl(n,t)},ul=e=>ge({},e);var Ai=(()=>{let t=class t{constructor(n,i,o,s){this.fundsSearchService=n,this.store=i,this.depotIndexService=o,this.zielmarktPruefungsService=s,this.foundFonds=new Map}enrichWithUnterDepotInformation(n){let i=this.store.selectSnapshot(Ee.getFeatureToggleValue(we.USE_RUECKNAHMEPREIS_AS_AUSGABEPREIS));return this.unterdepots$().pipe(v(o=>this.buildPruefbarerFondsNeu(n,()=>this.buildPruefeNeukaufMoeglich$(n.isin),fa(o(n.isin)),i)))}buildPruefbarerFondsNeu(n,i,o,s){return{isChecking:!1,name:n.name,kvgName:n.kvgName,isin:n.isin,wkn:n.wkn,ausgabeAufschlag:n.ausgabeAufschlag,preis:s?n.ruecknahmePreis:n.preis,priceDatePlus:n.priceDatePlus,portraitUrl:n.portraitUrl,isUnionFonds:n.isUnionFonds,pruefeNeukaufMoeglich$:i,isFondsInUnterdepotVorhanden:o.isInNonVlRiesterUnterdepotVorhanden,unterdepotsMitDiesemFonds:o.nonVlRiesterUnterdepotsMitDiesemFonds,istSparplanMoeglich:n.isSparplanfaehig,fondsart:n.fondsart,ausgabePreisBeinhaltetAusgabeaufschlag:!s,fondstypBezeichnung:n.fondstypBezeichnung,vlFoerderfaehig:n.vlFoerderfaehig}}sucheFonds$(n){let i=this.store.selectSnapshot(Ee.getFeatureToggleValue(we.USE_RUECKNAHMEPREIS_AS_AUSGABEPREIS));return no([this.searchFunds$(n),this.unterdepots$()]).pipe(v(([o,s])=>o.map(m=>ml(m,()=>this.buildPruefeNeukaufMoeglich$(m.isin),fa(s(m.isin)),i,n.vlDepot))),N(o=>this.saveFonds(o)))}showAusgabeAufschlag(){return this.store.selectSnapshot(Ee.getFeatureToggleValue(we.SHOW_AUSGABEAUFSCHLAG))}findFondsByIsin$(n){return this.foundFonds.has(n)?F(this.foundFonds.get(n)):this.getProductType$().pipe(oe(1),de(i=>this.sucheFonds$({suchbegriff:n,onlyUnionFonds:!1,maxResults:100,excludeEtfs:!1,productType:i,vlDepot:!1})),v(i=>{if(i.length===1)return i[0]}))}produktInformationenForIsin$(n){return this.findFondsByIsin$(n).pipe(v(i=>mi(i,this.showAusgabeAufschlag())))}searchFunds$(n){return this.fundsSearchService.searchFunds$(n.suchbegriff,n.maxResults,n.onlyUnionFonds,n.excludeEtfs,n.productType,n.vlDepot)}isDepotUdkProduct$(){return this.store.select(Ce.getProductType).pipe(v(Po))}getProductType$(){return this.store.select(Ce.getProductType)}unterdepots$(){return this.store.dispatch(new $t(this.getDepotIndex())).pipe(v(()=>this.store.selectSnapshot(L.alleNonVlRiesterUnterdepotIdsProStammdepotUndIsin)),v(n=>i=>n(this.getDepotIndex(),i)))}getDepotIndex(){return Number(this.depotIndexService.getDepotIndex())}buildPruefeNeukaufMoeglich$(n){return dl(()=>this.store.dispatch(new Mn(n)).pipe(v(()=>this.store.selectSnapshot(Rn.isPurchasable(n)))),()=>this.zielmarktPruefungsService.check$(n).pipe(v(s=>fl.get(s))))}saveFonds(n){n.forEach(i=>this.foundFonds.set(i.isin,i))}};t.\u0275fac=function(i){return new(i||t)(h(ea),h($),h(ce),h($o))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),dl=(e,t)=>e().pipe(de(r=>r?t():F(re.FEHLENDE_VERKAUFSUNTERLAGEN)),k(()=>F(re.TECHNISCHER_FEHLER))),fa=e=>({isInNonVlRiesterUnterdepotVorhanden:e.length>0,nonVlRiesterUnterdepotsMitDiesemFonds:e.map(t=>({unterdepotId:t}))}),ml=(e,t,r,n,i)=>({name:e.name,kvgName:e.kvgName,isin:e.isin,wkn:e.wkn,ausgabeAufschlag:e.upfrontFee,preis:{betrag:n?e.ruecknahmePreis:e.lastPrice,waehrung:n?e.ruecknahmePreisWaehrung:e.lastPriceCurrency,datum:new Date(e.lastDatePrice)},priceDatePlus:e.priceDatePlus,portraitUrl:e.portraitUrl,isUnionFonds:e.unionFund,pruefeNeukaufMoeglich$:t,isFondsInUnterdepotVorhanden:r.isInNonVlRiesterUnterdepotVorhanden,unterdepotsMitDiesemFonds:r.nonVlRiesterUnterdepotsMitDiesemFonds,istSparplanMoeglich:e.savingPlanKZ==="J",fondsart:ta(e.fondsartKZ),ausgabePreisBeinhaltetAusgabeaufschlag:!n,fondstypBezeichnung:e.fondstypBezeichnung,vlFoerderfaehig:i?e.vlFoerderfaehig:void 0}),fl=new Map([[Ct.ERMITTELT,re.ERFOLG],[Ct.KEINE_ZIELMARKT_INFORMATIONEN,re.FEHLENDE_ZIELMARKTINFORMATIONEN],[Ct.FEHLER_BEIM_ERMITTELN,re.TECHNISCHER_FEHLER]]);var dt=function(e){return e.MID_MONTH="MID_MONTH",e.BEGIN_OF_MONTH="BEGIN_OF_MONTH",e}(dt||{});var Fr=e=>{if(!e)return null;let t=new Date(e),r=t.getFullYear(),n=wn(t.getMonth()+1),i=wn(t.getDate());return`${r}-${n}-${i}`},em=(e,t,r)=>{if(!t||!r)return null;let n=new Date(t),i=new Date(r);for(n.setHours(0,0,0,0),i.setHours(0,0,0,0),i.setDate(e===dt.BEGIN_OF_MONTH?1:15);i.getTime()<n.getTime();)i.setMonth(i.getMonth()+1);let o=i.getFullYear(),s=wn(i.getMonth()+1),m=e===dt.BEGIN_OF_MONTH?wn(1):wn(15);return`${o}-${s}-${m}`},wn=e=>e.toString(10).padStart(2,"0"),tm=e=>e?Fr(e):null;var dn=(()=>{let t=class t{constructor(n,i){this.http=n,this.depotIndexService=i,this.URL="/order-functional-service",this.VALIDATE_BUY_URL=`${this.URL}/depot/%depotIndex%/validate-buy`,this.VALIDATE_VL_BUY_URL=`${this.URL}/depot/%depotIndex%/auftrag/vl-neukauf`,this.VALIDATE_UMTAUSCH_URL=`${this.URL}/depot/%depotIndex%/anlageziel/%anlagezielId%/fund-swap/validate`,this.VALIDATE_ORDER=`${this.URL}/depot/%depotIndex%/anlageziel/%anlagezielId%/validate-change`,this.SAVINGSPLAN_EXECUTION_DATES_URL=`${this.URL}/orderSavingsplanExecutionDates`}validateOrder$(n,i){let o=this.buildUrl(this.VALIDATE_ORDER,{anlagezielId:n});return this.postRequest(o,i.orderRequest).pipe(k(s=>Q(()=>An(s))))}validateBuy$(n){let i=this.buildUrl(this.VALIDATE_BUY_URL,{}),o=ge({},n);return o.savingsPlan&&(o.savingsPlan.action="NEW"),this.postRequest(i,o).pipe(k(s=>Q(()=>An(s))))}validateVlBuy$(n){let i=this.buildUrl(this.VALIDATE_VL_BUY_URL,{});return this.postRequest(i,ge({},n)).pipe(k(o=>Q(()=>An(o))))}validateUmtausch$(n,i){let o=this.buildUrl(this.VALIDATE_UMTAUSCH_URL,{anlagezielId:n});return this.postRequest(o,i).pipe(k(s=>Q(()=>An(s))))}orderSparplanExecutionDates$(){return this.get(this.SAVINGSPLAN_EXECUTION_DATES_URL)}get(n){return this.http.get(n).pipe(k(i=>Q(()=>i)))}buildUrl(n,i){return n=n.replace("%depotIndex%",this.depotIndexService.getDepotIndex()),i&&i?.anlagezielId!==0&&(n=n.replace("%anlagezielId%",i.anlagezielId)),n}postRequest(n,i){return this.http.post(n,i).pipe(k(o=>Q(()=>o)))}};t.\u0275fac=function(i){return new(i||t)(h(ae),h(ce))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var yi=(()=>{let t=class t{constructor(n,i,o,s,m,S){this.orderClient=n,this.depotIndexService=i,this.validateChangeInterceptor=o,this.validateBuyInterceptor=s,this.validateExchangeInterceptor=m,this.bestandGeaendertEventHandler=S,this.cancelPending$=new Te}static validateResponseToResult(n,i,o){let s=null;return o.txId&&(s={depotIdx:n,unterdepotId:i,txId:o.txId,redirectUrl:o.redirectUri,daskaStatus:o.daskaStatus}),{transactionCoordinates:s,invalidMessage:null}}static buyResponseToResult(n,i){let o=null;return i.txId&&(o={depotIdx:n,txId:i.txId,redirectUrl:i.redirectUri,daskaStatus:i.daskaStatus}),{transactionCoordinates:o,invalidMessage:null}}static handleValidateOrderError(n){if(n.type===Me.BUSINESS_ERROR)return F({invalidMessage:n.message,transactionCoordinates:null,daskaErrorCode:n.daskaErrorCode});throw n}validateOrder$(n,i,o){this.cancelPending();let s=this.depotIndexService.getDepotIndex(),m=o?this.validateChangeInterceptor.intercept(o,i):i;return this.orderClient.validateOrder$(n,{orderRequest:m}).pipe(Re(this.cancelPending$),v(S=>t.validateResponseToResult(s,n,S)),k(t.handleValidateOrderError))}validateBuy$(n){this.cancelPending();let i=this.depotIndexService.getDepotIndex(),o=this.validateBuyInterceptor.intercept({isin:n.isin},n);return this.orderClient.validateBuy$(o).pipe(Re(this.cancelPending$),v(s=>t.buyResponseToResult(i,s)),k(t.handleValidateOrderError))}validateVlBuy$(n){this.cancelPending();let i=this.depotIndexService.getDepotIndex(),o=this.validateBuyInterceptor.intercept({isin:n.isin},n);return this.orderClient.validateVlBuy$(o).pipe(Re(this.cancelPending$),v(s=>t.buyResponseToResult(i,s)),k(t.handleValidateOrderError))}validateFondsUmtausch$(n,i,o){this.cancelPending();let s=o?this.validateExchangeInterceptor.intercept(o,i):i,m=this.depotIndexService.getDepotIndex();return this.orderClient.validateUmtausch$(n,s).pipe(Re(this.cancelPending$),v(S=>t.validateResponseToResult(m,n,S)),k(t.handleValidateOrderError))}invalidateCache(n){n&&this.bestandGeaendertEventHandler.onBestandGeandert(Number(n.depotIdx),"unterdepotId"in n?n.unterdepotId:void 0)}cancelPending(){this.cancelPending$.next(null)}};t.\u0275fac=function(i){return new(i||t)(h(dn),h(ce),h(Ko),h(jo),h(Zo),h(Wo))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var va=(()=>{let t=class t{constructor(n){this.nonBankingDaysDataSource=n,this.nonBankingDays=[],this.isWeekendDay=i=>i.getDay()===6||i.getDay()===0,this.nonBankingDays=this.nonBankingDaysDataSource.load()||[]}isNonBankingDay(n){let i=n instanceof Date?n:new Date(n),o=gl(i);return o&&this.nonBankingDays.includes(o)||this.isWeekendDay(i)}};t.\u0275fac=function(i){return new(i||t)(h(Xo))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),gl=e=>{if(!e)return null;let t=new Date(e),r=t.getFullYear(),n=Ea(t.getMonth()+1),i=Ea(t.getDate());return`${r}-${n}-${i}`},Ea=e=>e.toString(10).padStart(2,"0");var Cm=e=>{let t=e?new Date(e):Sa();return Ta(Pr(t,1))},Tm=e=>{let t=e?new Date(e):Sa();return Ta(El(t,1))},Sa=()=>new Date,_l=e=>e%4===0&&e%100!==0||e%400===0,Ca=(e,t)=>{let r=[31,_l(e)?29:28,31,30,31,30,31,31,30,31,30,31][t];if(!r)throw new Error("invalid month: "+t);return r};function Pr(e,t){if(t===void 0)return;let r=new Date(e),n=r.getUTCDate();return r.setUTCDate(1),r.setUTCMonth(r.getUTCMonth()+t),r.setUTCDate(Math.min(n,Ca(r.getUTCFullYear(),r.getUTCMonth()))),r}function El(e,t){if(t===void 0)return;let r=new Date(e),n=r.getDate();return r.setDate(1),r.setMonth(r.getMonth()+t),r.setDate(Math.min(n,Ca(r.getFullYear(),r.getMonth()))),r}var Ta=e=>new Date(e.getFullYear(),e.getMonth(),1),vl=e=>/(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])/.test(e);function Ia(e){return!e||!vl(e)?null:new Date(e)}var Sl=(e,t)=>!e||!t?!1:e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear(),Im=(e,t)=>!Sl(e,t)&&e>t;var Mi=class{constructor(t,r=()=>new Date){this.isNonBankingDay=t,this.today=r}getMinDate(t,r){let n=t.startDate??this.today();return n=ba(n,t),bl(n,r)}getMaxDate(t,r,n){let i;return t.maxDate?i=t.maxDate:(i=this.startDate(t,n),i=ba(i,t),i=t.lastDayOfMonth?this.setDayToLastDayOfMonth(i):i),Il(i,r)}startDate(t,r){return t.startDate?t.startDate:t.fromMinDate?r:this.today()}getDateValidator(t){let r=[];return t?.disableDaysFrom29to31&&r.push(Cl),t?.disableAllDaysExcept1and15&&r.push(Tl),t?.disableNonBankingDays&&r.push(n=>!this.isNonBankingDay(n)),n=>{if(!n)return!1;for(let i of r)if(!i(n))return!1;return!0}}setDayToLastDayOfMonth(t){return new Date(t.getFullYear(),t.getMonth()+1,0,1)}},ba=(e,t)=>{let r=new Date(e);return r=Rr(r,t.daysToAdd),r=t.monthsToAdd?Pr(r,t.monthsToAdd):r,r=Ol(r,t.yearsToAdd),r},Cl=e=>e.getDate()<29,Tl=e=>e.getDate()===1||e.getDate()===15,Il=(e,t)=>{for(;!t(e);)e=Rr(e,-1);return e};function bl(e,t){for(;!t(e);)e=Rr(e,1);return e}var Rr=(e,t)=>{if(t===void 0)return e;let r=new Date(e);return r.setUTCDate(e.getUTCDate()+t),r},Ol=(e,t)=>{if(t===void 0)return e;let r=new Date(e);return r.setUTCFullYear(e.getUTCFullYear()+t),r};var xi=(()=>{let t=class t{constructor(n){this.nonBankingDaysService=n,this.toMinMaxDateConfig=(i,o)=>i?.datum!=null?{maxDate:new Date(i.datum)}:{startDate:i?.basisDatum==="STARTDATUM"?o:this.today(),daysToAdd:i?.modifikationen?.TAGE,monthsToAdd:i?.modifikationen?.MONATE,yearsToAdd:i?.modifikationen?.JAHRE},this.toDateSelectionParameter=({datumConfig:i,startDate:o,restoreDate:s})=>({filterConfig:{disableAllDaysExcept1and15:i?.deaktiviereTageAusser1und15,disableDaysFrom29to31:i?.deaktiviereTage29bis31,disableNonBankingDays:i?.deaktiviereBankfeiertage},minDateConfig:this.toMinMaxDateConfig(i?.min,o),maxDateConfig:this.toMinMaxDateConfig(i?.max,o),restoreDate:s}),this.today=()=>new Date,this.dateRange=new Mi(i=>n.isNonBankingDay(i))}zukaufConfig(n){return this.datumValidierungenToDateSelectionConfig(n)}verkaufConfig(n){return this.datumValidierungenToDateSelectionConfig(n)}limitConfig(){let n=new Date;return this.createDateSelectionConfig({filterConfig:{disableAllDaysExcept1and15:!1,disableDaysFrom29to31:!1,disableNonBankingDays:!0},minDateConfig:{daysToAdd:n.getHours()>15?1:0},maxDateConfig:{monthsToAdd:1,lastDayOfMonth:!0,fromMinDate:!0}})}vlNeukaufConfig(){return this.createDateSelectionConfig({filterConfig:{disableAllDaysExcept1and15:!1,disableDaysFrom29to31:!1,disableNonBankingDays:!1},minDateConfig:{daysToAdd:1},maxDateConfig:{yearsToAdd:1}})}sparplanAusfuehrungConfigForNeukaufWithFremdFondsEnabled(n){return this.createDateSelectionConfig({filterConfig:{disableAllDaysExcept1and15:n,disableDaysFrom29to31:!0,disableNonBankingDays:!1},minDateConfig:{daysToAdd:1},maxDateConfig:{yearsToAdd:1}})}sparplanEndeConfigForNeukauf(n){return this.createDateSelectionConfig({filterConfig:{disableAllDaysExcept1and15:!1,disableDaysFrom29to31:!1,disableNonBankingDays:!0},minDateConfig:{startDate:n,monthsToAdd:2},maxDateConfig:{startDate:n,yearsToAdd:20}})}sparplanAusfuehrungConfigForBearbeitung(n){return this.createDateSelectionConfig(this.toDateSelectionParameter(n))}sparplanEndeConfigForBearbeitung(n){return this.createDateSelectionConfig(this.toDateSelectionParameter(n))}auszahlplanStartdatumConfig(){return this.sparplanAusfuehrungConfigForNeukaufWithFremdFondsEnabled(!1)}auszahlplanBearbeitenAusfuehrungsDatumConfig(n){return Qe(ge({},this.auszahlplanStartdatumConfig()),{restoreDate:n})}umtauschConfig(){return this.createDateSelectionConfig({filterConfig:{disableAllDaysExcept1and15:!1,disableDaysFrom29to31:!1,disableNonBankingDays:!0},minDateConfig:{daysToAdd:1},maxDateConfig:{monthsToAdd:3}})}pdfExportConfig(n){return{validMinDate:n,validMaxDate:this.today()}}createDateSelectionConfig(n){let i=this.dateRange.getDateValidator(n.filterConfig),o=this.dateRange.getMinDate(n.minDateConfig,i),s=this.dateRange.getMaxDate(n.maxDateConfig,i,o);return{isDateValid:Nl(o,s,i),validMinDate:o,validMaxDate:s,restoreDate:n.restoreDate}}datumValidierungenToDateSelectionConfig(n){return this.createDateSelectionConfig(this.toDateSelectionParameter({datumConfig:n}))}};t.\u0275fac=function(i){return new(i||t)(h(va))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Nl=(e,t,r)=>n=>n?(!e||!Oa(n,e))&&(!t||!Oa(t,n))&&(!r||r(n)):!1,Oa=(e,t)=>{let r=new Date(e);r.setHours(0,0,0,0);let n=new Date(t);return n.setHours(0,0,0,0),r<n};function kn(e){return t=>e.notDirtyIsValid&&!t.dirty?null:Al(t,e.translationKey,e.min,e.tooltipType,e.formattingFn(e.minPerYear??e.min))}function Al(e,t,r,n,i){if(Aa(e.value)||Aa(r))return null;let o=parseFloat(e.value);return!isNaN(o)&&o<r?{min:{min:r,actual:e.value,translationKey:t,translationVariables:{min:i},type:n}}:null}function Aa(e){return e==null||e.length===0}var Fe=function(e){return e.ERROR="error",e.ERROR_INFO="error-info",e.INFO="info",e.INFO_ACTION="info-action",e}(Fe||{});function Un(e,t,r,n=Fe.ERROR){return i=>yl(i,e,t,n,r(t))}function yl(e,t,r,n,i){let o=typeof r=="function"?r():r;if(ya(e.value)||ya(o))return null;let s=parseFloat(e.value),m=typeof o=="string"?parseFloat(o):o;return!isNaN(s)&&s>m?{max:{max:o,actual:e.value,translationKey:t,translationVariables:{max:i},type:n}}:null}function ya(e){return e==null||Ml(e)}function Ml(e){return typeof e!="string"&&!Array.isArray(e)?!1:e.length===0}var xl=(e="de-DE",t=!1)=>r=>{let n=new Yt(e),i=typeof r=="number"&&t?Math.floor(r):r;return n.transform(i)},Fl=e=>e,mn=e=>e?.formatNumber?xl(e.locale,e.betragAbrundenInFehlermeldung):Fl,Ma=e=>{let t=mn(e.formatSettings),r=e.minTranslationKey||"ANLAGEZIEL_NUMBER_INPUT__VALIDATOR-MIN-EUR",n=e.maxTranslationKey||"ANLAGEZIEL_NUMBER_INPUT__VALIDATOR-MAX-EUR";return[kn({translationKey:r,min:e.min,formattingFn:t,tooltipType:Fe.ERROR,notDirtyIsValid:e.notDirtyIsValid}),Un(n,e.max,t,Fe.ERROR)]},Vm=e=>{let t=mn(e.formatSettings),r=e.minTranslationKey||"ANLAGEZIEL_NUMBER_INPUT__VALIDATOR-MIN-EUR";return kn({translationKey:r,min:e.min,formattingFn:t,tooltipType:Fe.ERROR,notDirtyIsValid:e.notDirtyIsValid})},Bm=e=>{let t=mn(e.formatSettings),r=e.maxTranslationKey||"ANLAGEZIEL_NUMBER_INPUT__VALIDATOR-MAX-EUR";return Un(r,e.max,t,Fe.ERROR)};function xa(e){return t=>Pl(t,e.translationKey,e.tooltipType,e.formattingFn(e.min))}var Fi=e=>{let t=e.minTranslationKey||"ANLAGEZIEL_NUMBER_INPUT__VALIDATOR-MIN-EUR";return xa({translationKey:t,min:e.min,formattingFn:mn(e.formatSettings),tooltipType:Fe.ERROR})},Fa=e=>xa({translationKey:e,min:0,formattingFn:mn({formatNumber:!1}),tooltipType:Fe.ERROR}),$m=()=>Fa("LIMIT-ORDER__EMPTY_DATE"),Km=()=>Fa("LIMIT-ORDER__EMPTY_INPUT");function Pl(e,t,r,n){return Rl(e.value)?{required:{actual:e.value,translationKey:t,translationVariables:{min:n},type:r}}:null}function Rl(e){return e==null||e.length===0}var Vn=(()=>{let t=class t{constructor(n){this.productType=n}};t.type="[Configurations] ordering load configurations";let e=t;return e})();var Dr,Bn="ordering_bestand_configurations",We,wt=(We=class{constructor(t){this.configurationProvider=t}static getConfigValue(t){return _e([Dr],r=>t(r))}load$({setState:t},{productType:r}){return this.configurationProvider.getConfigurations$(r).pipe(oe(1),N(n=>t(()=>n)))}},Dr=We,We.\u0275fac=function(r){return new(r||We)(h(ui))},We.\u0275prov=C({token:We,factory:We.\u0275fac}),We);I([J(Vn),u("design:type",Function),u("design:paramtypes",[Object,Vn]),u("design:returntype",j)],wt.prototype,"load$",null);wt=Dr=I([le({name:Bn}),u("design:paramtypes",[Object])],wt);var Pi=(()=>{let t=class t{constructor(n,i){this.store=n,this.dateSelectionConfigFactory=i}createUmtauschConfig(n){let i=this.store.selectSnapshot(L.unterdepotsProID)(n),o=this.dateSelectionConfigFactory.umtauschConfig(),s={defaultValidations:this.createBetragValidators(i?.betrag.aktuellerWert??null),requiredValidator:this.createRequiredValidator(),mindestBetrag:this.mindestbetrag()},m=this.store.selectSnapshot(Ee.getFeatureToggleValue(we.ENABLE_UMTAUSCH_ALS_VERKAUF_KAUF));return new Lr(o,s,m)}createBetragValidators(n){let i=this.getProductConfiguration();return Ma({min:i.minWithdrawal*-1,max:n,formatSettings:{formatNumber:!0,betragAbrundenInFehlermeldung:!0}})}createRequiredValidator(){return Fi({min:this.mindestbetrag(),formatSettings:{formatNumber:!0}})}mindestbetrag(){return Math.abs(this.store.selectSnapshot(wt.getConfigValue(n=>n.minWithdrawal)))}getProductConfiguration(){return this.store.selectSnapshot(n=>n[Bn])}};t.\u0275fac=function(i){return new(i||t)(h($),h(xi))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Lr=class{constructor(t,r,n){this.dateSelectionConfig=t,this.umtauschValidators=r,this.enableUmtauschAlsVerkaufKauf=n}};var Ra=function(e){return e.RIESTER="RIESTER",e.VL="VL",e}(Ra||{}),Da=e=>!Object.values(Ra).includes(e);var At=class{static fromUnterdepot(t){return{subProductType:t.produkt?.eigenschaften?.sonderauspraegung?.valueOf(),pictureFilename:t.bild?.dateiname,isEtf:t.fondsart==="ETF_FREMDFONDS"}}static fromSparplan(t,r=Date.now()){return{hasSparplan:Ll(t,r)}}static fromAuszahlplan(t){return{hasAuszahlplan:t.length>0}}static fromSavingsOptimizations(t){return{hasSavingsOptimizations:t.length>0}}static mergeMetaData(t,r){return t?r?{hasSparplan:t.hasSparplan||r.hasSparplan,hasAuszahlplan:t.hasAuszahlplan||r.hasAuszahlplan,hasSavingsOptimizations:t.hasSavingsOptimizations||r.hasSavingsOptimizations,subProductType:t.subProductType!=null?t.subProductType:r.subProductType,pictureFilename:t.pictureFilename!=null?t.pictureFilename:r.pictureFilename,isEtf:t.isEtf||r.isEtf}:t:r}};function Dl(e,t){let r=e.execution?.finalExecution;return!r||new Date(r).getTime()>t}function Ll(e,t){return e.filter(n=>Dl(n,t)).length>0}var Ri=class{static fromUnterdepot(t){return{id:t.keys?.id,nr:t.keys?.unterdepotIndex,meta:At.fromUnterdepot(t),status:wl(t.status),name:{given:t.name?.vergeben,chosen:t.name?.gewaehlt},value:t.betrag?.zukuenftigerWert,isin:t.produkt?.einzelfonds?.isin??void 0,stueckanzahl:t.produkt?.einzelfonds?.stueckanzahl,waehrung:t.produkt?.einzelfonds?.ruecknahmePreis?.currency,priceDatePlus:t.produkt?.einzelfonds?.priceDatePlus}}},Kt=function(e){return e.INVESTED="INVESTED",e.SAVED="SAVED",e.SOLD="SOLD",e}(Kt||{}),La=(e,t)=>{let r=e.value??0;return(t.value??0)-r};function wl(e){switch(e){case Ln.ENTWURF:return Kt.SAVED;case Ln.IN_AUFLOESUNG:return Kt.SOLD;case Ln.AKTIV:return Kt.INVESTED;default:return}}var Di=(()=>{let t=class t{constructor(){}};t.type="[Sparplaene] load state";let e=t;return e})(),wa=(()=>{let t=class t{constructor(){}};t.type="[Sparplaene] load precalculated execution dates";let e=t;return e})();var zn,kl="bestand_sparplaene",Xe,mt=(Xe=class{constructor(t,r,n,i){this.anlagezielService=t,this.depotIndexService=r,this.orderClient=n,this.store=i,this.requestManager=pe.forDepotIndexUnawareState(),this.ausfuehrungsDatenRequestManager=new pe}static forAnlageziel(t){return _e([zn],r=>r.sparplaene?.get(t))}static hasFremdFonds(t){return _e([zn],r=>r.hasFremdFonds?.get(t))}static all(t){return t.sparplaene}static ausfuehrungsDaten(t){let r=t.ausfuehrungsDaten;return r==null?null:{[dt.BEGIN_OF_MONTH]:new Date(r.executionDates[dt.BEGIN_OF_MONTH]),[dt.MID_MONTH]:new Date(r.executionDates[dt.MID_MONTH]),defaultExecutionDate:new Date(r.executionDates[r.defaultExecutionTime]),defaultExecutionDayOfMonth:r.defaultExecutionTime===dt.BEGIN_OF_MONTH?1:15,defaultExecutionDayString:r.defaultExecutionTime}}static hasPlansForUnterdepotId(t){return r=>{if(!t)return null;let n=t.get(r);return n&&n.length>0}}static sparplanValidierungenForAnlageziel(t){return _e([zn],r=>r.validierungen?.get(t))}loadSparplaene({setState:t}){let r=this.anlagezielService.getAnlagezieleSparplaene$().pipe(N(n=>{t(fe(i=>{i.sparplaene||(i.sparplaene=new Map,i.validierungen=new Map,i.hasFremdFonds=new Map),n.forEach(o=>{i.sparplaene?.set(o.anlagezielId,o.plans),i.validierungen?.set(o.anlagezielId,o.validierungen),i.hasFremdFonds?.set(o.anlagezielId,o.hasFremdFonds)})}))}));return this.requestManager.executeRequest(this.depotIndexService.getDepotIndex(),se.always(),r)}loadAusfuehrungsDaten(t){if(this.store.selectSnapshot(Ee.getFeatureToggleValue(we.EDITABLE_SAVINGSPLAN_EXECUTION_DATE))){let r=this.orderClient.orderSparplanExecutionDates$().pipe(N(n=>{t.setState(fe(i=>{i.ausfuehrungsDaten=n}))}));return this.ausfuehrungsDatenRequestManager.executeRequest("AusfuehrungsDaten",se.always(),r)}return F(void 0)}},zn=Xe,Xe.\u0275fac=function(r){return new(r||Xe)(h(ve),h(ce),h(dn),h($))},Xe.\u0275prov=C({token:Xe,factory:Xe.\u0275fac}),Xe);I([J(Di),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",j)],mt.prototype,"loadSparplaene",null);I([J(wa),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",j)],mt.prototype,"loadAusfuehrungsDaten",null);I([V(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Map)],mt,"all",null);I([V(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Object)],mt,"ausfuehrungsDaten",null);I([V([mt.all,L.unterdepotsProID]),u("design:type",Function),u("design:paramtypes",[Map]),u("design:returntype",Function)],mt,"hasPlansForUnterdepotId",null);mt=zn=I([le({name:kl,defaults:{sparplaene:null,validierungen:null,ausfuehrungsDaten:null,hasFremdFonds:null}}),u("design:paramtypes",[ve,an,dn,$])],mt);var Li=(()=>{let t=class t{};t.type="[Auszahlplaene] load state";let e=t;return e})(),wr=(()=>{let t=class t{constructor(n){this.azId=n}};t.type="[Auszahlplaene] load state for current anlageziel";let e=t;return e})();var kr,Ul="ordering_bestand_auszahlplaene",qe,yt=(qe=class{constructor(t,r,n){this.anlagezielService=t,this.depotIndexService=r,this.store=n,this.perDepotRequestManager=pe.forDepotIndexUnawareState(),this.perAnlagezielRequestManager=new pe,this.auszahlplanEnabled$=this.store.select(Ee.getFeatureToggleValue(we.PAYOUT_PLAN_ENABLED))}static forAnlageziel(t){return _e([kr],r=>r.auszahlplaene?.get(t))}static all(t){return t.auszahlplaene}loadAuszahlplaene$({setState:t}){let r=this.auszahlplanEnabled$.pipe(oe(1),Ue(n=>n),de(()=>this.anlagezielService.getAnlagezieleAuszahlplaene$()),N(n=>{t(yr(i=>{i.auszahlplaene||(i.auszahlplaene=new Map),n.forEach(o=>{i.auszahlplaene.set(o.anlagezielId,o.auszahlplaene)})}))}));return this.perDepotRequestManager.executeRequest(this.depotIndexService.getDepotIndex(),se.always(),r)}static hasPlansForUnterdepotId(t){return r=>{if(!t)return null;let n=t.get(r);return n&&n.length>0}}loadAuszahlplaeneForAnlageziel$({setState:t},r){let n=this.anlagezielService.getSingleAnlagezielAuszahlplan$(r.azId).pipe(oe(1),N(i=>{t(yr(o=>{o.auszahlplaene||(o.auszahlplaene=new Map),o.auszahlplaene.set(r.azId,i)}))}));return this.perAnlagezielRequestManager.executeRequest(r.azId,se.always(),n)}},kr=qe,qe.\u0275fac=function(r){return new(r||qe)(h(ve),h(ce),h($))},qe.\u0275prov=C({token:qe,factory:qe.\u0275fac}),qe);I([J(Li),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",j)],yt.prototype,"loadAuszahlplaene$",null);I([J(wr),u("design:type",Function),u("design:paramtypes",[Object,wr]),u("design:returntype",j)],yt.prototype,"loadAuszahlplaeneForAnlageziel$",null);I([V(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Map)],yt,"all",null);I([V([yt.all]),u("design:type",Function),u("design:paramtypes",[Map]),u("design:returntype",Function)],yt,"hasPlansForUnterdepotId",null);yt=kr=I([le({name:Ul,defaults:{auszahlplaene:new Map}}),u("design:paramtypes",[ve,an,$])],yt);var Ur=class extends Error{},Vr=class extends Error{},ka=(()=>{let t=class t{constructor(n){this.store=n}static all(n,i,o){return s=>{let m=n(s)?.map(Ri.fromUnterdepot),S=Br.withEntries(m||[]);return S.addSavingsPlans(i),S.addPayoutPlans(o),S.merged}}load$(n){let i=this.dispatchNecessaryLoadAction(new $t(n)),o=this.dispatchOptionalLoadAction(new Di),s=this.dispatchOptionalLoadAction(new Li);return Zn(i,o,s).pipe(N(m=>{if(m.find(S=>S===fn.fail))throw new Ur;if(m.find(S=>S===fn.notOk))throw new Vr}),v(()=>{}))}all$(){return Xt([this.store.select(L.alleUnterdepotsProStammdepot),this.store.select(mt.all),this.store.select(yt.all)]).pipe(v(n=>t.all(...n)))}dispatchNecessaryLoadAction(n){return this.dispatchLoadAction(n,fn.fail)}dispatchOptionalLoadAction(n){return this.dispatchLoadAction(n,fn.notOk)}dispatchLoadAction(n,i){return this.store.dispatch(n).pipe(v(()=>fn.ok),k(()=>F(i)))}};t.\u0275fac=function(i){return new(i||t)(h($))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Br=class e{constructor(){this.merged=[]}static addSavingsPlanInfo(t,r){if(r!=null){let n=At.fromSparplan(r);t.meta=At.mergeMetaData(t.meta,n)}return t}static addPayoutPlanInfo(t,r){if(r!=null){let n=At.fromAuszahlplan(r);t.meta=At.mergeMetaData(t.meta,n)}return t}static withEntries(t){let r=new e;return t||(t=[]),r.merged=t,r}addSavingsPlans(t){t!=null&&(this.merged=this.merged.map(r=>{let n=t.get(r.id);return e.addSavingsPlanInfo(r,n)}))}addPayoutPlans(t){t!=null&&(this.merged=this.merged.map(r=>{let n=t.get(r.id);return e.addPayoutPlanInfo(r,n)}))}},fn=function(e){return e[e.ok=0]="ok",e[e.fail=1]="fail",e[e.notOk=2]="notOk",e}(fn||{});var Ua=(()=>{let t=class t{constructor(n,i,o){this.store=n,this.stammdepotIndexService=i,this.dataService=o}alleImAktuellenStammdepot$(){return this.dataService.all$().pipe(v(n=>n(parseInt(this.stammdepotIndexService.getDepotIndex(),10))))}load$(){return Zn(this.store.dispatch(new It(this.stammdepotIndexService.getDepotIndex())),this.dataService.load$(Number(this.stammdepotIndexService.getDepotIndex()))).pipe(v(()=>{}))}invested$(n){return this.alleImAktuellenStammdepot$().pipe(v(i=>i.filter(o=>o.status===Kt.INVESTED)),v(i=>(n&&(i=i.sort(n)),i)),Wn(1))}investedWithBestand$(n){return this.invested$(n).pipe(v(i=>i.filter(o=>o.value>0)))}istLetztesUnterdepot$(){return this.alleImAktuellenStammdepot$().pipe(v(n=>n.filter(i=>i.status===Kt.INVESTED).length===1))}};t.\u0275fac=function(i){return new(i||t)(h($),h(ce),h(ka))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var zl=new Map([[lt.UMTAUSCH,"UMTAUSCH"],[lt.VERKAUF_KAUF,"VERKAUF_KAUF"]]),wi=(()=>{let t=class t{constructor(n,i,o,s,m){this.store=n,this.unterdepotsUebersichtViewModel=i,this.fondsSucheViewModel=o,this.transaktionenOrderService=s,this.umtauschConfigViewModel=m,this.AMOUNT_OF_UNTERDEPOTS_TO_PROCESS_FOR_UMTAUSCH=1,this.unterdepots=[],this.enableUmtauschAlsVerkaufKauf$=this.store.select(Ee.getFeatureToggleValue(we.ENABLE_UMTAUSCH_ALS_VERKAUF_KAUF))}static sortSubdepotsByValueDescending(n){return n.sort(La)}enableUmtauschAlsVerkaufKauf(){return this.store.selectSnapshot(Ee.getFeatureToggleValue(we.ENABLE_UMTAUSCH_ALS_VERKAUF_KAUF))}starteUmtausch(n){let i=lt.UMTAUSCH,o=this.store.selectSnapshot(L.unterdepotsProID)(n);if(!o)throw new Error(`Unterdepot with id ${n} not found.`);let m=(this.unterdepots?this.unterdepots.filter(g=>g.isin!==o.produkt.einzelfonds?.isin):[]).map(g=>Qe(ge({},g),{pruefeNeukaufMoeglich$:()=>this.fondsSucheViewModel.buildPruefeNeukaufMoeglich$(g.isin)})),S=this.umtauschConfigViewModel.createUmtauschConfig(n);return new zr(m,{unterdepotId:n,unterdepotIndex:o.keys.unterdepotIndex,isin:o.produkt.einzelfonds?.isin??void 0,name:o.name?.vergeben,aktuellerWert:o.betrag.aktuellerWert,priceDatePlus:o.produkt.einzelfonds?.priceDatePlus},i,S)}load$(){let n=this.unterdepotsUebersichtViewModel.load$(),i=this.unterdepotsUebersichtViewModel.invested$().pipe(Ue(o=>o.length>=this.AMOUNT_OF_UNTERDEPOTS_TO_PROCESS_FOR_UMTAUSCH),v(o=>o.filter(s=>Da(s.meta.subProductType))),v(t.sortSubdepotsByValueDescending));return n.pipe(de(()=>i),v(o=>{this.unterdepots=o}),oe(1))}fromUmtauschModel(n){return new Hr(this.transaktionenOrderService,n)}};t.\u0275fac=function(i){return new(i||t)(h($),h(Ua),h(Ai),h(yi),h(Pi))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),zr=class{constructor(t,r,n,i){this.unterdepots=t,this.sourceUnterdepot=r,this.umtauschArt=n,this.config=i,this.ausfuehrungsDatum=null}},Hr=class{constructor(t,r){this.orderService=t,this.umtausch=r}execute(){let t=this.createUmtauschValidierungRequest();return this.orderService.validateFondsUmtausch$(this.umtausch.sourceUnterdepot.unterdepotId,t,this.umtausch.validateExchangeContext).pipe(v(r=>this.toExecutionResult(r)))}createUmtauschValidierungRequest(){return{amount:this.umtausch.isKomplettumtausch?100:this.umtausch.betrag,unit:this.umtausch.isKomplettumtausch?"PERCENT":"EURO",deleteSubDepot:this.umtausch.isKomplettumtausch,sourceIsin:this.umtausch.sourceUnterdepot.isin,destinationIsin:this.umtausch.unterdepotIndexToTradeIn!=null?this.umtausch.unterdepots[this.umtausch.unterdepotIndexToTradeIn]?.isin:this.umtausch.fondsToTradeIn?.isin,destinationAnlagezielId:this.umtausch.unterdepotIndexToTradeIn!=null?this.umtausch.unterdepots[this.umtausch.unterdepotIndexToTradeIn]?.id.toString()??null:null,executionDate:Fr(this.umtausch.ausfuehrungsDatum),overwriteExperienceCheck:this.umtausch.uebersteuereZielmarktkonflikt,umtauschArt:this.umtausch.config.enableUmtauschAlsVerkaufKauf?zl.get(this.umtausch.umtauschArt):void 0}}toExecutionResult(t){return{displayMsg:t.invalidMessage,daskaErrorCode:t.daskaErrorCode,orderCoordinates:t.transactionCoordinates,invalidateCaches:()=>this.orderService.invalidateCache(t.transactionCoordinates)}}};var gn={labelKey:"SALES_DOCUMENTS_MISSING_OVERLAY__TITLE_EXCHANGE_FUNDS",overlayId:"sales-documents-missing-overlay-exchange-funds",textKey:"SALES_DOCUMENTS_MISSING_OVERLAY__TEXT"},hn={labelKey:"TARGET_MARKET_DATA_MISSING_OVERLAY__TITLE_EXCHANGE",overlayId:"target-market-data-missing-overlay-exchange",textKey:"TARGET_MARKET_DATA_MISSING_OVERLAY__TEXT"},Gr={labelKey:"SALES_DOCUMENTS_MISSING_OVERLAY__TITLE_PURCHASE_FUNDS",overlayId:"sales-documents-missing-overlay-purchase-funds",textKey:"SALES_DOCUMENTS_MISSING_OVERLAY__TEXT"},$r={labelKey:"TARGET_MARKET_DATA_MISSING_OVERLAY__TITLE_PURCHASE_FUNDS",overlayId:"target-market-data-missing-overlay-purchase-funds",textKey:"TARGET_MARKET_DATA_MISSING_OVERLAY__TEXT"},_n=(()=>{let t=class t{constructor(n){this.modalService=n}closeModal(){this.modalService.close(this.transactionType.overlayId)}};t.\u0275fac=function(i){return new(i||t)(x(at))},t.\u0275cmp=P({type:t,selectors:[["app-transaktion-error-modal"]],inputs:{transactionType:"transactionType"},standalone:!0,features:[G],decls:10,vars:10,consts:[["type","error",3,"vhId"],["vhModalHeader",""],["vhButton","","data-test-id","umtausch-error-overlay-close","variant","secondary",3,"click"]],template:function(i,o){i&1&&(l(0,"vh-modal",0)(1,"h2",1),_(2),d(3,"translate"),c(),_(4),d(5,"translate"),l(6,"vh-modal-footer")(7,"button",2),b("click",function(){return o.closeModal()}),_(8),d(9,"translate"),c()()()),i&2&&(p("vhId",o.transactionType.overlayId),a(2),A(f(3,4,o.transactionType.labelKey)),a(2),M(" ",f(5,6,o.transactionType.textKey)," "),a(4),A(f(9,8,"SALES_DOCUMENTS_MISSING_OVERLAY__BUTTON")))},dependencies:[X,Z,Be,Vt,li,ai,si,Mo],encapsulation:2});let e=t;return e})();var Kr=class{},ki=class{targetFonds(t){return t.fondsToTradeIn}back(){return xe.FONDS_UMTAUSCH_SEARCH}currentAssetValue(t){return 0}},Ui=class extends Kr{targetFonds(t){let r=t.unterdepots[t.unterdepotIndexToTradeIn];return{isin:r.isin,name:r.name.given,priceDatePlus:r.priceDatePlus}}back(){return xe.CHOOSE_EXISTING_FUND}currentAssetValue(t){return t.unterdepots[t.unterdepotIndexToTradeIn].value}};var Hl=e=>({fondsName:e});function Gl(e,t){e&1&&(l(0,"vh-notification",14),_(1),d(2,"translate"),c()),e&2&&(a(),M("",f(2,1,"UMTAUSCH_BESTANDSFONDS_NO_SELECTION")," "))}function $l(e,t){if(e&1&&(l(0,"vh-selectable-card",15)(1,"div",16),U(2,"or-ui-anlageziel-picture",17),l(3,"div",18),_(4),c(),l(5,"div",19),_(6),c(),l(7,"div",20)(8,"div",3),_(9),c(),l(10,"div",21),_(11),d(12,"translate"),c()(),l(13,"div",7)(14,"div",22),_(15),c(),l(16,"div",23),_(17),d(18,"translate"),c()(),l(19,"div",24),_(20),d(21,"currency"),c()()()),e&2){let r=t.$implicit,n=t.index;p("value",r),nt("data-test-id","select-new-umtausch-card-"+n),a(2),p("picture",r.meta.pictureFilename),a(2),A(r.name.given),a(2),A(r.name.chosen),a(3),A(r.nr),a(2),$e("",f(12,12,"UMTAUSCH_CARD_HEADER_UNTERDEPOT")," : ",r.nr,""),a(4),A(r.isin),a(2),$e("",f(18,14,"UMTAUSCH_CARD_HEADER_ISIN")," : ",r.isin,""),a(3),A(De(21,16,r.value,"EUR"))}}var za=(()=>{let t=class t extends ie{constructor(n,i){super(),this.modalService=n,this.overlayService=i,this.buttonConfigs={nextButton:{dataTestId:"umtausch-select-existing-fonds-next"},specialButton:{dataTestId:"umtausch-select-existing-fonds-back",textLabel:"ANLAGEZIEL-TRANSAKTION--BACK"},abortButton:{dataTestId:"umtausch-select-existing-fonds-abort"}},this.destroy$=new Te,this.isCurrentlyNavigating=!1,this.showNoSelectionOverlay=!1,this.UMTAUSCH_ZIELMARKTKONFLIKTE=hn,this.UMTAUSCH_FEHLENDE_DOKUMENTE=gn,this.CLOSE_REASON=K}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onBack(){this.navigateTo.emit(xe.SELECT_NEW_OR_EXISTING)}onNext(){if(!this.currentSelection){this.showNoSelectionOverlay=!0;return}this.isCurrentlyNavigating=!0,this.currentSelection.pruefeNeukaufMoeglich$().pipe(Re(this.destroy$),v(n=>{this.handlePruefungsErgebnis(n,this.currentSelection)}),xt(()=>this.isCurrentlyNavigating=!1)).subscribe()}handlePruefungsErgebnis(n,i){switch(n){case re.TECHNISCHER_FEHLER:this.handleTechnicalError();break;case re.FEHLENDE_VERKAUFSUNTERLAGEN:this.handlePurchaseInfoBusinessError();break;case re.FEHLENDE_ZIELMARKTINFORMATIONEN:this.handleTargetMarketBusinessError();break;case re.ERFOLG:this.handleSuccess(i);break}}handleSuccess(n){this.model.unterdepots&&(this.model.unterdepotIndexToTradeIn=this.model.unterdepots.indexOf(n),this.model.strategy=new Ui,this.navigateTo.emit(xe.SELECT_AMOUNT))}handleTechnicalError(){this.overlayService.showGeneralErrorModal()}handleTargetMarketBusinessError(){this.modalService.open(hn.overlayId)}handlePurchaseInfoBusinessError(){this.modalService.open(gn.overlayId)}};t.\u0275fac=function(i){return new(i||t)(x(at),x(on))},t.\u0275cmp=P({type:t,selectors:[["app-choose-existing-fund-step-container"]],standalone:!0,features:[W,G],decls:26,vars:31,consts:[[3,"title","subheader"],[3,"title"],["class","mrg-b-4-bd","type","error",4,"ngIf"],[1,"hide-on-mobile"],[1,"header-grid","vh-font-style-10"],[1,"card-chosen-name"],[1,"card-unterdepot-nr"],[1,"card-isin"],[1,"card-depotwert"],[1,"content-wrapper"],["required","","data-test-id","select-umtausch-card-group",1,"cards",3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"specialButton","abortButton","nextButton","pending","buttonConfigs"],[3,"transactionType"],["type","error",1,"mrg-b-4-bd"],[3,"value"],[1,"card-grid"],["iconFontSize","33px","pictureSize","60px",1,"card-icon","hide-on-mobile",3,"picture"],[1,"card-fonds-name","vh-font-style-7"],[1,"card-chosen-name","vh-font-style-10"],[1,"card-unterdepot-nr","vh-font-style-10"],[1,"show-only-on-mobile"],[1,"hide-on-mobile","vh-font-style-6"],[1,"show-only-on-mobile","vh-font-style-10","mrg-t-3-bd"],[1,"vh-font-style-7","card-depotwert"]],template:function(i,o){i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),d(2,"translate"),l(3,"or-ui-transaktion-card",1),d(4,"translate"),y(5,Gl,3,3,"vh-notification",2),l(6,"div",3)(7,"div",4)(8,"p",5),_(9),d(10,"translate"),c(),l(11,"p",6),_(12),d(13,"translate"),c(),l(14,"p",7),_(15),d(16,"translate"),c(),l(17,"p",8),_(18),d(19,"translate"),c()()(),l(20,"div",9)(21,"vh-selectable-card-group",10),St("ngModelChange",function(m){return vt(o.currentSelection,m)||(o.currentSelection=m),m}),y(22,$l,22,19,"vh-selectable-card",11),c()()(),l(23,"or-ui-transaktion-button-group",12),b("specialButton",function(){return o.onBack()})("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("nextButton",function(){return o.onNext()}),c()(),U(24,"app-transaktion-error-modal",13)(25,"app-transaktion-error-modal",13)),i&2&&(p("title",f(1,14,"FONDS_UMTAUSCH_TITEL"))("subheader",De(2,16,"CHOOSE_EXISTING_FUND_STEP__CATCH_PHRASE",he(29,Hl,o.model==null?null:o.model.sourceUnterdepot.name))),a(3),p("title",f(4,19,"CHOOSE_EXISTING_FUND_TITLE")),a(2),p("ngIf",o.showNoSelectionOverlay),a(4),A(f(10,21,"UMTAUSCH_CARD_HEADER_NAME")),a(3),A(f(13,23,"UMTAUSCH_CARD_HEADER_UNTERDEPOT")),a(3),A(f(16,25,"UMTAUSCH_CARD_HEADER_ISIN")),a(3),A(f(19,27,"UMTAUSCH_CARD_HEADER_DEPOTWERT")),a(3),Et("ngModel",o.currentSelection),a(),p("ngForOf",o.model.unterdepots),a(),p("pending",o.isCurrentlyNavigating)("buttonConfigs",o.buttonConfigs),a(),p("transactionType",o.UMTAUSCH_FEHLENDE_DOKUMENTE),a(),p("transactionType",o.UMTAUSCH_ZIELMARKTKONFLIKTE))},dependencies:[q,Pt,Eo,X,Z,Be,ne,en,it,Qt,Jt,nn,rn,wo,_n,Ne,Oe,te,ee],styles:['.hide[_ngcontent-%COMP%]{display:none}.icon-attention-red[_ngcontent-%COMP%]{color:var(--color-group-35);font-size:20px}.form-control-error[_ngcontent-%COMP%]   i.icon.icon-attention-red[_ngcontent-%COMP%]{color:unset}.text-align-right[_ngcontent-%COMP%]{text-align:right}.text-align-center[_ngcontent-%COMP%]{text-align:center}.flow-text[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.headline[_ngcontent-%COMP%]{text-align:center}.h1-order[_ngcontent-%COMP%], .h2[_ngcontent-%COMP%], .h3[_ngcontent-%COMP%], .h4[_ngcontent-%COMP%]{margin-bottom:20px;font-weight:700}.h1-order[_ngcontent-%COMP%]{color:var(--color-group-1);font-family:var(--vh-font-family-1);font-weight:var(--vh-font-weight-1);text-transform:var(--vh-text-transform-1);font-size:var(--vh-font-size-1);line-height:var(--vh-line-height-1)}@media (min-width: 1440px){.h1-order[_ngcontent-%COMP%]{font-size:48px}}.h2-order-details-headline[_ngcontent-%COMP%]{color:var(--color-group-69);font-family:var(--vh-font-family-2);font-weight:var(--vh-font-weight-2);text-transform:var(--vh-text-transform-2);font-size:var(--vh-font-size-2);line-height:var(--vh-line-height-2)}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:20px}.margin-complete-component[_ngcontent-%COMP%]{margin:40px 0}.radio-seperator[_ngcontent-%COMP%]{margin:0 10px;color:var(--color-group-69);font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.document-downloaded[_ngcontent-%COMP%]{color:var(--color-group-33)}@media screen and (width <= 767px){.button[_ngcontent-%COMP%]{margin-left:0;margin-right:0}}.mrg-b-1-bd[_ngcontent-%COMP%]{margin-bottom:4px}.mrg-b-2-bd[_ngcontent-%COMP%]{margin-bottom:8px}.mrg-b-4-bd[_ngcontent-%COMP%]{margin-bottom:16px}.mrg-b-6-bd[_ngcontent-%COMP%]{margin-bottom:24px}.mrg-b-8-bd[_ngcontent-%COMP%]{margin-bottom:32px}.mrg-b-10-bd[_ngcontent-%COMP%]{margin-bottom:40px}.mrg-t-3-bd[_ngcontent-%COMP%]{margin-top:16px}.mrg-t-6-bd[_ngcontent-%COMP%]{margin-top:24px}.mrg-t-7-bd[_ngcontent-%COMP%]{margin-top:28px}.mrg-t-8-bd[_ngcontent-%COMP%]{margin-top:32px}.mrg-t-12-bd[_ngcontent-%COMP%]{margin-top:48px}.details-margin-top[_ngcontent-%COMP%]{margin-top:40px}.confirmation-subline[_ngcontent-%COMP%]{font-size:16px}.subline[_ngcontent-%COMP%]{text-align:center;font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.container-fluid[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px;max-width:1260px;margin-left:auto;margin-right:auto}@media (width >= 768px){.container-fluid[_ngcontent-%COMP%]{padding-left:30px;padding-right:30px}}main[_ngcontent-%COMP%]{min-height:calc(100vh - 200px)}.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:8px}@media (min-width: 768px){.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:16px}}.margin-labeled-content[_ngcontent-%COMP%]:last-child{margin-bottom:0}.mt-between-boxes[_ngcontent-%COMP%]{margin-top:24px}@media (width >= 768px){.mt-between-boxes[_ngcontent-%COMP%]{margin-top:30px}}.button-group[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}@media (width <= 576px){.button-group[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;max-height:calc(65vh - 120px);overflow-y:scroll}.header-grid[_ngcontent-%COMP%]{padding:0 16px;display:grid;grid-gap:8px;grid-template-columns:60px 2fr 1fr 1fr 1fr;grid-template-areas:"name name unterdepotNr isin depotwert"}.card-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:60px 2fr 1fr 1fr 1fr;grid-template-areas:"icon fondsName unterdepotNr isin depotwert" "icon name . . .";grid-gap:8px}@media (width < 768px){.card-grid[_ngcontent-%COMP%]{grid-template-areas:"icon fondsName unterdepotNr isin isin" "icon name . depotwert depotwert"}}@media (width < 576px){.card-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;grid-gap:4px;grid-template-areas:"fondsName" "name" "isin" "unterdepotNr" "depotwert"}}.card-icon[_ngcontent-%COMP%]{grid-area:icon}.card-chosen-name[_ngcontent-%COMP%]{grid-area:name}.card-unterdepot-nr[_ngcontent-%COMP%]{grid-area:unterdepotNr}.card-isin[_ngcontent-%COMP%]{grid-area:isin}.card-depotwert[_ngcontent-%COMP%]{grid-area:depotwert}@media (width < 576px){.card-depotwert[_ngcontent-%COMP%]{text-align:right}}.card-fonds-name[_ngcontent-%COMP%]{grid-area:fondsName}.hide-on-mobile[_ngcontent-%COMP%]{display:block}@media (width < 576px){.hide-on-mobile[_ngcontent-%COMP%]{display:none}}.show-only-on-mobile[_ngcontent-%COMP%]{display:none}@media (width < 576px){.show-only-on-mobile[_ngcontent-%COMP%]{display:block}}']});let e=t;return e})();var jl=["*"];function Zl(e,t){if(e&1&&(l(0,"span",7)(1,"span"),_(2),d(3,"async"),c()()),e&2){let r=T(2);a(2),A(f(3,1,r.selectedFundsAmount$()))}}function Wl(e,t){if(e&1){let r=Y();l(0,"li")(1,"button",12),b("click",function(){let i=R(r).$implicit,o=T(4);return D(o.removeFund(i))}),l(2,"span",13),_(3),c(),U(4,"vh-icon",14),c()()}if(e&2){let r=t.$implicit;a(3),A(r.name)}}function Xl(e,t){if(e&1&&(l(0,"ul",10),y(1,Wl,5,1,"li",11),d(2,"async"),c()),e&2){let r=T(3);a(),p("ngForOf",f(2,1,r.fondManager.allFonds$()))}}function ql(e,t){e&1&&(l(0,"p",15),_(1),d(2,"translate"),c()),e&2&&(a(),A(f(2,1,"FONDSSUCHE_SHOPPING_CART_EMPTY")))}function Yl(e,t){if(e&1&&(l(0,"fnsrch-tooltip"),y(1,Xl,3,3,"ul",8),d(2,"async"),y(3,ql,3,3,"p",9),d(4,"async"),c()),e&2){let r=T(2);a(),p("ngIf",f(2,2,r.selectedFundsAmount$())),a(2),p("ngIf",f(4,4,r.selectedFundsAmount$())===0)}}function Jl(e,t){if(e&1){let r=Y();l(0,"div",1)(1,"div",2)(2,"button",3),b("click",function(){R(r);let i=T();return D(i.openShoppingCart())}),U(3,"vh-icon",4),y(4,Zl,4,3,"span",5),d(5,"async"),c(),y(6,Yl,5,6,"fnsrch-tooltip",6),c()()}if(e&2){let r=T();a(4),p("ngIf",f(5,2,r.selectedFundsAmount$())),a(2),p("ngIf",r.showShoppingCart)}}function Ql(e,t){if(e&1){let r=Y();l(0,"vh-icon",12),b("click",function(){R(r);let i=T();return qt(1).focusFirst(),D(i.clearSearch())}),c()}}function ec(e,t){e&1&&U(0,"fnsrch-shopping-cart")}function tc(e,t){if(e&1&&(l(0,"div",13)(1,"vh-checkbox",14)(2,"span"),_(3),d(4,"translate"),c()()()),e&2){let r=T();a(),p("formControl",r.unionFondsOnly),a(2),A(f(4,2,"FNSRC__SEARCH_CHECKBOX_UNION_ONLY"))}}var nc=e=>({disabled:e});function ic(e,t){if(e&1){let r=Y();l(0,"li",11)(1,"button",12),b("click",function(i){let o=R(r).$implicit,s=T(3);return D(s.openDocument(i,o))}),U(2,"vh-icon",13),l(3,"span",14),_(4),c()()()}if(e&2){let r=t.$implicit,n=T(3);p("title",n.getDocumentHint(r)),a(),p("disabled",!r.available)("ngClass",he(5,nc,!r.available)),nt("data-test-id",r.documentType),a(3),A(r.displayName)}}function rc(e,t){if(e&1&&(l(0,"div",9)(1,"ul"),y(2,ic,5,7,"li",10),c()()),e&2){let r=T(2);a(2),p("ngForOf",r.documentsToShow.documentList)}}function oc(e,t){if(e&1&&(l(0,"fnsrch-tooltip",7),y(1,rc,3,1,"div",8),c()),e&2){let r=T(),n=qt(8);p("position",r.tooltipPosition),nt("data-test-id","context-menu-tooltip"),a(),p("ngIf",r.documentsToShow)("ngIfElse",n)}}function ac(e,t){e&1&&U(0,"vh-loading-spinner")}function sc(e,t){if(e&1&&(l(0,"li",6)(1,"p",7),_(2),c()()),e&2){let r=T();a(2),A(r.mappedFondsTypBezeichnung())}}function lc(e,t){e&1&&(l(0,"li",8)(1,"p",7),_(2),d(3,"translate"),c()()),e&2&&(a(2),A(f(3,1,"FNSRC__ETF_BADGE")))}function cc(e,t){e&1&&(l(0,"li",9)(1,"p",7),_(2),d(3,"translate"),c()()),e&2&&(a(2),A(f(3,1,"FNSRC__ELTIF_BADGE")))}function pc(e,t){e&1&&(l(0,"li",10)(1,"p",7),_(2),d(3,"translate"),c()()),e&2&&(a(2),A(f(3,1,"FNSRC__SPARPLAN_BADGE")))}function uc(e,t){e&1&&(l(0,"li",11)(1,"p",7),_(2),d(3,"translate"),c()()),e&2&&(a(2),A(f(3,1,"FNSRC__VL_BADGE")))}var dc=e=>({"fond-is-selected":e});function mc(e,t){if(e&1){let r=Y();l(0,"a",27),b("click",function(i){R(r);let o=T(3);return D(o.openNewTabWithoutSelectFond(i))}),U(1,"span",28),c()}if(e&2){let r=T().$implicit;p("href",r==null?null:r.portraitUrl,so)}}function fc(e,t){if(e&1){let r=Y();l(0,"li",14),b("click",function(){let i=R(r).$implicit,o=T(2);return D(o.handleClickedFond(i))})("keydown.space",function(){let i=R(r).$implicit,o=T(2);return D(o.handleClickedFond(i))})("keydown.enter",function(){let i=R(r).$implicit,o=T(2);return D(o.handleClickedFond(i))}),l(1,"div",9)(2,"span",15),U(3,"fnsrch-bagde-list",16),c(),l(4,"span",17),_(5),y(6,mc,2,1,"a",18),c(),l(7,"span",19),_(8),c(),l(9,"span",8),_(10),c(),l(11,"span",20),_(12),c(),l(13,"span",21),_(14),d(15,"translate"),d(16,"translate"),c(),l(17,"span",9)(18,"p",22),_(19),d(20,"translate"),c(),_(21),d(22,"customPercent"),c(),l(23,"span",23),_(24),d(25,"customCurrency"),c(),l(26,"div",24)(27,"div",25)(28,"fnsrch-document-list",26),b("click",function(){R(r);let i=T(2);return D(i.ignoreClick=!0)})("keydown",function(){R(r);let i=T(2);return D(i.ignoreClick=!0)})("errored",function(i){R(r);let o=T(2);return D(o.handleDocumentError(i))}),c()()()()()}if(e&2){let r=t.$implicit,n=t.index;T();let i=qt(19),o=T();p("ngClass",he(34,dc,o.isSelected(r))),a(),p("ngClass",o.ausgabeaufschlagAnzeigen?"card-content":"card-content__ausgabeaufschlag-invisible"),nt("data-test-id","fond-"+(n+1)),a(2),p("isSparplanfaehig",r.isSparplanfaehig)("fondsart",r.fondsart)("fondstypBezeichnung",r.fondstypBezeichnung)("isVlFoerderfaehig",r.vlFoerderfaehig),a(2),M(" ",r.name==null?null:r.name.trim()," "),a(),p("ngIf",r.portraitUrl),a(2),M(" ",r.kvgName," "),a(2),M(" ",r.isin," "),a(2),M(" ",r.wkn," "),a(2),mo(" ",f(15,24,"FNSRC__RESULTS_LABEL_ISIN")," ",r.isin," | ",f(16,26,"FNSRC__RESULTS_LABEL_WKN")," ",r.wkn," "),a(3),p("ngClass",o.ausgabeaufschlagAnzeigen?"ausgabeaufschlag":"ausgabeaufschlag__invisible"),a(2),M(" ",f(20,28,"FNSRC__RESULTS_LABEL_UPFRONTFEE_MOBILE")," "),a(2),M(" ",f(22,30,r.ausgabeAufschlag)," % "),a(3),$e(" ",f(25,32,r.preis==null?null:r.preis.betrag)," ",r.preis==null?null:r.preis.waehrung," "),a(4),p("fonds",r)("tooltipBoundary",i)("index",n+1)}}function gc(e,t){if(e&1&&(l(0,"div")(1,"div",6)(2,"span",7),_(3),d(4,"translate"),c(),l(5,"span",8),_(6),d(7,"translate"),d(8,"translate"),c(),l(9,"span",9),_(10),d(11,"translate"),c(),l(12,"span",10),_(13),d(14,"translate"),c(),l(15,"span",11),_(16),d(17,"translate"),c()(),l(18,"div",12,0)(20,"ul"),y(21,fc,29,36,"li",13),d(22,"async"),c()()()),e&2){let r=T();a(),lo("top",r.offsetToTop+"px"),p("ngClass",r.ausgabeaufschlagAnzeigen?"header":"header__ausgabeaufschlag-invisible"),a(2),M(" ",f(4,11,"FNSRC__RESULTS_LABEL_FUNDNAME")," "),a(3),$e(" ",f(7,13,"FNSRC__RESULTS_LABEL_ISIN")," / ",f(8,15,"FNSRC__RESULTS_LABEL_WKN")," "),a(3),p("ngClass",r.ausgabeaufschlagAnzeigen?"ausgabeaufschlag":"ausgabeaufschlag__invisible"),a(),M(" ",f(11,17,"FNSRC__RESULTS_LABEL_UPFRONTFEE")," "),a(3),M(" ",f(14,19,"FNSRC__RESULTS_LABEL_LASTPRICE")," "),a(3),M(" ",f(17,21,"FNSRC__RESULTS_LABEL_DOCUMENTS")," "),a(5),p("ngForOf",f(22,23,r.foundFonds))}}function hc(e,t){if(e&1&&(er(0,29),l(1,"vh-notification",30),d(2,"translate"),d(3,"translate"),l(4,"p"),_(5),d(6,"translate"),d(7,"translate"),c()(),tr()),e&2){let r=T();a(),p("headline",f(2,2,"FNSRC__MAX_FONDS_ERROR_TITLE_1")+r.fondsManager.maxFonds+f(3,4,"FNSRC__MAX_FONDS_ERROR_TITLE_2")),a(4),A(f(6,6,"FNSRC__MAX_FONDS_ERROR_MSG_1")+r.fondsManager.maxFonds+f(7,8,"FNSRC__MAX_FONDS_ERROR_MSG_2"))}}var Bi=(()=>{class e{_maxFonds=10;currentlySelectedFonds=[];allowMultipleFonds=!1;disabled=!0;currentlySelectedFonds$=new et([]);addFonds(r){this.disabled||(this.allowMultipleFonds?this.addForMultipleFondsLogic(r):this.addForSingleFondsLogic(r))}get maxFonds(){return this._maxFonds}addForSingleFondsLogic(r){this.currentlySelectedFonds.includes(r)||(this.currentlySelectedFonds=[r],this.currentlySelectedFonds$.next(this.currentlySelectedFonds))}addForMultipleFondsLogic(r){this.currentlySelectedFonds.length>this._maxFonds-1||(this.currentlySelectedFonds.push(r),this.currentlySelectedFonds.sort(),this.currentlySelectedFonds$.next(this.currentlySelectedFonds))}setup(r,n,i){this.currentlySelectedFonds=[],this.allowMultipleFonds=r&&i>1,this.currentlySelectedFonds$.complete(),this._maxFonds=i,n.pipe(N(o=>this.disabled=o)).subscribe(),this.currentlySelectedFonds$=new et(this.currentlySelectedFonds)}removeFonds(r){if(this.disabled)return;let n=this.currentlySelectedFonds.findIndex(i=>i.isin===r.isin);n!==-1&&(this.currentlySelectedFonds.splice(n,1),this.currentlySelectedFonds$.next(this.currentlySelectedFonds))}containsFonds(r){return!!this.currentlySelectedFonds.find(n=>n.isin===r.isin)}allFonds$(){return this.currentlySelectedFonds$.asObservable()}allowsMultiSelection(){return this.allowMultipleFonds}isFull(){return this.allowMultipleFonds&&this.currentlySelectedFonds.length===this._maxFonds}static \u0275fac=function(n){return new(n||e)};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),Ha=(()=>{class e{position=Hn.BOTTOM_RIGHT;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=P({type:e,selectors:[["fnsrch-tooltip"]],inputs:{position:"position"},ngContentSelectors:jl,decls:4,vars:5,consts:[[1,"context-menu-tooltip-wrapper"],[1,"context-menu-tooltip"],[1,"context-menu-tooltip-content"]],template:function(n,i){n&1&&(po(),l(0,"div",0)(1,"div",1)(2,"span",2),uo(3),c()()()),n&2&&(co("context-menu-tooltip-align-bottom-left",i.position==="TOP_RIGHT")("context-menu-tooltip-align-top-left",i.position==="BOTTOM_RIGHT"),nt("data-test-id","context-menu-tooltip"))},styles:['.context-menu-tooltip-wrapper[_ngcontent-%COMP%]{position:absolute;max-width:330px;width:300px;box-sizing:border-box;background:var(--color-group-2);border-radius:3px;color:var(--color-group-134);opacity:.9;z-index:2}.context-menu-tooltip[_ngcontent-%COMP%]{min-width:295px;max-height:440px;overflow-y:auto;padding:18px}.context-menu-tooltip-content[_ngcontent-%COMP%]:before{content:"";position:absolute;margin:auto;width:0;height:0;border:6px solid transparent}.context-menu-tooltip-align-top-left[_ngcontent-%COMP%]{right:0;margin-top:12px}.context-menu-tooltip-align-top-left[_ngcontent-%COMP%]   .context-menu-tooltip-content[_ngcontent-%COMP%]:before{bottom:100%;right:16px;border-bottom-color:var(--color-group-2)}.context-menu-tooltip-align-bottom-left[_ngcontent-%COMP%]{right:0;bottom:calc(100% + 12px)}.context-menu-tooltip-align-bottom-left[_ngcontent-%COMP%]   .context-menu-tooltip-content[_ngcontent-%COMP%]:before{top:100%;right:16px;border-top-color:var(--color-group-2)}']})}return e})(),Hn=function(e){return e.TOP_RIGHT="TOP_RIGHT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e}(Hn||{}),_c=(()=>{class e{elementRef;fondManager;showShoppingCart=!1;isRemovedFundTargetEvent=!1;constructor(r,n){this.elementRef=r,this.fondManager=n}closeShoppingCart(){this.showShoppingCart=!1}onClickOutside(r){!this.elementRef.nativeElement.contains(r.target)&&!this.isRemovedFundTargetEvent&&this.closeShoppingCart(),this.isRemovedFundTargetEvent&&(this.isRemovedFundTargetEvent=!1)}selectedFundsAmount$(){return this.fondManager.allFonds$().pipe(v(r=>r.length))}openShoppingCart(){this.showShoppingCart=!0}removeFund(r){this.isRemovedFundTargetEvent=!0,this.fondManager.removeFonds(r)}static \u0275fac=function(n){return new(n||e)(x(Qi),x(Bi))};static \u0275cmp=P({type:e,selectors:[["fnsrch-shopping-cart"]],hostBindings:function(n,i){n&1&&b("keydown.escape",function(){return i.closeShoppingCart()},!1,In)("click",function(s){return i.onClickOutside(s)},!1,In)},decls:1,vars:1,consts:[["class","shopping-cart",4,"ngIf"],[1,"shopping-cart"],[1,"position-relative"],["tabindex","0","data-test-id","shopping_cart_badge",1,"shopping-cart--badge",3,"click"],["name","vh-ic_warenkorb_24"],["class","counter","data-test-id","shopping_cart_counter",4,"ngIf"],[4,"ngIf"],["data-test-id","shopping_cart_counter",1,"counter"],["class","shopping-cart--funds",4,"ngIf"],["class","empty-cart-msg","data-test-id","shopping_cart_empty_cart_msg",4,"ngIf"],[1,"shopping-cart--funds"],[4,"ngFor","ngForOf"],["tabindex","0",1,"no-extra-button-style","shopping-cart-item",3,"click"],[1,"shopping-cart--funds-name"],["name","vh-ic_delete_24"],["data-test-id","shopping_cart_empty_cart_msg",1,"empty-cart-msg"]],template:function(n,i){n&1&&y(0,Jl,7,4,"div",0),n&2&&p("ngIf",i.fondManager.allowsMultiSelection())},dependencies:[Pt,q,tn,Ha,Ve,Z],styles:[".shopping-cart[_ngcontent-%COMP%]{position:relative;margin-right:20px}.shopping-cart--badge[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:50%;border:0;background-color:var(--color-group-2);color:var(--color-group-134);margin:auto}.shopping-cart--funds[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0}.shopping-cart--funds[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{padding:4px 0}.shopping-cart--funds[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.shopping-cart--funds[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:first-child{padding-top:0}.shopping-cart--funds[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-child{padding-bottom:0;margin-bottom:0}.shopping-cart--funds-name[_ngcontent-%COMP%]{padding-right:4px}.shopping-cart-item[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}.empty-cart-msg[_ngcontent-%COMP%]{margin-bottom:0;font-size:var(--font-size-lg-7)}.counter[_ngcontent-%COMP%]{position:absolute;top:-12px;right:-9px;background-color:var(--color-group-vh-201);color:var(--color-group-vh-203);border-radius:50%;border:1px solid var(--color-group-134);width:26px;height:26px;cursor:default;display:flex}.counter[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin:2px auto auto}button.no-extra-button-style[_ngcontent-%COMP%]{text-align:left;border:0;color:inherit;background-color:inherit}"]})}return e})(),Ec=(()=>{class e{SEARCH_QUERY_MAX_LENGTH=70;ALLOWED_CHARACTERS="^[A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u017E0-9,'-:/.()_\\s]*$";initialSearchValue;currenltySearching$;isLoading;showServiceUnavailableNotification;showUnionInvestFondsOnlyToggle;controlsDisabled$=F(!1);isVl=!1;searchQuery=new tt;searchForm;inputChangedSinceLastSearch=!0;searchButtonWasClickedAtLeastOnce=!1;get currentSearchterm(){return this.searchForm.controls.searchTerm}get unionFondsOnly(){return this.searchForm.controls.unionFondsOnly}constructor(){this.searchForm=new Le({searchTerm:new Ie("",{nonNullable:!0,validators:[Xn.pattern(this.ALLOWED_CHARACTERS)]}),unionFondsOnly:new Ie(!0,{nonNullable:!0})}),this.searchForm.valueChanges.pipe(N(()=>this.enableSearch())).subscribe()}ngOnInit(){this.currentSearchterm.setValue(this.initialSearchValue??""),this.unionFondsOnly.setValue(this.showUnionInvestFondsOnlyToggle||this.isVl),this.isVl&&this.emitSearchQuery()}enableSearch(){this.inputChangedSinceLastSearch=!0}emitSearchQuery(){this.searchButtonWasClickedAtLeastOnce=!0,this.searchQuery.emit(this.searchForm.value),this.inputChangedSinceLastSearch=!1}isSearchResetAllowed(){return!!this.currentSearchterm.value}isSubmitAllowed$(){let r=!!this.currentSearchterm.value&&!this.currentSearchterm.errors&&this.inputChangedSinceLastSearch;return Xt([F(r),this.controlsDisabled$,this.currenltySearching$]).pipe(v(([n,i,o])=>n&&!i&&!o))}clearSearch(){this.searchForm.controls.searchTerm.reset(),this.isVl&&this.emitSearchQuery()}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=P({type:e,selectors:[["fnsrch-searchbar"]],inputs:{initialSearchValue:"initialSearchValue",currenltySearching$:"currenltySearching$",isLoading:"isLoading",showServiceUnavailableNotification:"showServiceUnavailableNotification",showUnionInvestFondsOnlyToggle:"showUnionInvestFondsOnlyToggle",controlsDisabled$:"controlsDisabled$",isVl:"isVl"},outputs:{searchQuery:"searchQuery"},decls:21,vars:25,consts:[["focusSetter","vhFocusSetter"],["xmlns","http://www.w3.org/1999/html","vhFocusSetter","",1,"searchbar-form",3,"formGroup"],[1,"searchbar-with-submitbutton"],["aria-label","Sucheingabe","autocapitalize","off","autofocus","","data-test-id","search_field_input","id","fundSearchField","type","text",3,"enforceMaxLength","formControl","label","maxLength","showCounter"],["data-test-id","search_field_clear_button","name","vh-ic_clear_24","vhSuffix","",3,"click",4,"ngIf"],["on","pattern","validateWhen","dirty"],["vhButton","","tabindex","0","data-test-id","search_button","type","submit",1,"search-button-cta","submit-button",3,"click","loading","disabled"],["name","vh-ic_search_24","vhPrefix",""],["vhButton","","tabindex","0","data-test-id","search_button","type","submit",1,"search-button-cta-without-label","submit-button",3,"click","loading","disabled"],[1,"spacer"],[4,"ngIf"],["class","space-to-above",4,"ngIf"],["data-test-id","search_field_clear_button","name","vh-ic_clear_24","vhSuffix","",3,"click"],[1,"space-to-above"],["data-test-id","fund_search_union_only",3,"formControl"]],template:function(n,i){if(n&1){let o=Y();l(0,"form",1,0)(2,"div",2)(3,"vh-input",3),d(4,"translate"),y(5,Ql,1,0,"vh-icon",4),l(6,"vh-error",5),_(7),d(8,"translate"),c()(),er(9),l(10,"button",6),d(11,"async"),b("click",function(){return R(o),D(i.emitSearchQuery())}),U(12,"vh-icon",7),_(13),d(14,"translate"),c(),l(15,"button",8),d(16,"async"),b("click",function(){return R(o),D(i.emitSearchQuery())}),U(17,"vh-icon",7),c(),tr(),U(18,"div",9),y(19,ec,1,0,"fnsrch-shopping-cart",10),c(),y(20,tc,5,4,"div",11),c()}n&2&&(p("formGroup",i.searchForm),a(3),p("enforceMaxLength",!0)("formControl",i.currentSearchterm)("label",f(4,15,"FNSRC__SEARCH_FIELD_PLACEHOLDER"))("maxLength",i.SEARCH_QUERY_MAX_LENGTH)("showCounter",!1),a(2),p("ngIf",i.isSearchResetAllowed()),a(2),A(f(8,17,"FNSRC__INVALID_CHARACTER")),a(3),p("loading",!!i.isLoading&&!i.showServiceUnavailableNotification)("disabled",f(11,19,i.isSubmitAllowed$())===!1),a(3),M(" ",f(14,21,"FNSRC__SEARCH_BUTTON")," "),a(2),p("loading",!!i.isLoading)("disabled",f(16,23,i.isSubmitAllowed$())===!1),a(4),p("ngIf",i.searchButtonWasClickedAtLeastOnce),a(),p("ngIf",i.showUnionInvestFondsOnlyToggle))},dependencies:[q,Rt,it,rt,qn,Yn,ti,ei,ii,tn,bo,Vt,_c,Ve,Z],styles:[".searchbar-form[_ngcontent-%COMP%]{padding:0 12px}.searchbar-with-submitbutton[_ngcontent-%COMP%]{display:flex;justify-content:start;align-items:center}vh-input[_ngcontent-%COMP%]{min-width:250px}.spacer[_ngcontent-%COMP%]{flex-grow:42}.submit-button[_ngcontent-%COMP%]{margin-left:24px}fnsrch-shopping-cart[_ngcontent-%COMP%]{margin-left:16px}.space-to-above[_ngcontent-%COMP%]{margin-top:8px}@media only screen and (width >= 481px){.search-button-cta-without-label[_ngcontent-%COMP%]{display:none}}@media only screen and (width <= 480px){.search-button-cta[_ngcontent-%COMP%]{display:none}.submit-button[_ngcontent-%COMP%]{margin-left:12px}fnsrch-shopping-cart[_ngcontent-%COMP%]{margin-left:12px}vh-input[_ngcontent-%COMP%]{min-width:200px}.spacer[_ngcontent-%COMP%]{flex-grow:0}vh-checkbox[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{line-break:anywhere}}"]})}return e})(),En=function(e){return e.KEY_INVESTOR_DOCUMENT="KEY_INVESTOR_DOCUMENT",e.PROSPECTUS="PROSPECTUS",e.ANNUAL_REPORT="ANNUAL_REPORT",e.SEMIANNUAL_REPORT="SEMIANNUAL_REPORT",e}(En||{}),vc=new me("portfolio-fs-base-url",{factory:()=>"/portfolio-functional-service"}),Ga=new me("should-use-support-endpoints",{factory:()=>!1}),jr=(()=>{class e{baseUrlService;isInSupportContext;constructor(r,n){this.baseUrlService=r,this.isInSupportContext=n}baseUrl(){return`${this.baseUrlService}`}supportRouteIfRequired(){let r=this.isInSupportContext?"/support":"";return`${this.baseUrl()}${r}`}getFondssucheUrl(){return`${this.supportRouteIfRequired()}/fundsearch`}getFondsDocumentUrlFor(r){return`${this.baseUrl()}/funds/${r}/documents`}static \u0275fac=function(n){return new(n||e)(h(vc),h(Ga))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})(),$a=(()=>{class e{http;urlProvider;constructor(r,n){this.http=r,this.urlProvider=n}getFondsDocuments(r){return this.requestFondsDocuments(r).pipe(v(n=>({isin:r,documentList:n})))}requestFondsDocuments(r){return this.http.get(this.urlProvider.getFondsDocumentUrlFor(r))}static \u0275fac=function(n){return new(n||e)(h(ae),h(jr))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();var Vi="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",Ih=new Map([["LU1309710678",{isin:"LU1309710678",documentList:[{available:!0,displayName:"Verkaufsprospekt",documentType:En.PROSPECTUS,url:Vi},{available:!1,displayName:"Jahresbericht",documentType:En.ANNUAL_REPORT,url:Vi},{available:!0,displayName:"Basisinformationsblatt (BIB)",documentType:En.KEY_INVESTOR_DOCUMENT,url:Vi}]}],["LU1309711056",{isin:"LU1309711056",documentList:[{available:!0,displayName:"Basisinformationsblatt (BIB)",documentType:En.KEY_INVESTOR_DOCUMENT,url:Vi}]}],["DE0005326565",{isin:"DE0005326565",documentList:[]}]]),Sc=(()=>{class e{elementRef;documentService;translate;fonds;index;tooltipBoundary;errored=new tt;documentsToShow;showTooltip$=new et(!1);tooltipPosition=Hn.BOTTOM_RIGHT;constructor(r,n,i){this.elementRef=r,this.documentService=n,this.translate=i}openDocumentContextMenu(r){this.documentService.getFondsDocuments(this.fonds.isin).subscribe({next:n=>{if(n.documentList.length===0){this.errored.emit({isin:this.fonds.isin,type:vn.MISSING_DOCUMENT_ERROR});return}this.documentsToShow=this.buildDocumentsListFrom(n),this.decideAndSetTooltipPosition(r),this.showTooltip$.next(!0)},error:()=>{this.errored.emit({isin:this.fonds.isin,type:vn.GENERIC_ERROR})}})}buildDocumentsListFrom(r){let n=this.replaceDocuments(this.stubDocumentList(),r.documentList);return{isin:r.isin,documentList:n}}stubDocumentList(){return Object.keys(En).map(r=>({available:!1,displayName:this.translate.instant(`FNSRC__${r}`),documentType:r,url:""}))}replaceDocuments(r,n){let i=[...r];return n.forEach(o=>{let s=r.findIndex(m=>m.documentType===o.documentType);s>=0&&(i[s]=o)}),i}onEscapeClick(){this.showTooltip$.next(!1)}onClickOutside(r){!this.elementRef.nativeElement.contains(r.target)&&this.showTooltip$&&(r.stopPropagation(),this.showTooltip$.next(!1))}openDocument(r,n){r.stopPropagation(),n&&n.available?window.open(n.url,"_blank"):this.errored.emit({isin:this.fonds.isin,type:vn.GENERIC_ERROR})}getDocumentHint(r){return r.available?r.displayName:this.translate.instant("FUND_DOCUMENTS_NO_AVAILABLE_HINT")}decideAndSetTooltipPosition(r){let i=r.closest("#buttonWrapper")?.offsetTop??0,o=this.tooltipBoundary.scrollTop??0,m=i-o>170;this.tooltipPosition=m?Hn.TOP_RIGHT:Hn.BOTTOM_RIGHT}static \u0275fac=function(n){return new(n||e)(x(Qi),x($a),x(pi))};static \u0275cmp=P({type:e,selectors:[["fnsrch-document-list"]],hostBindings:function(n,i){n&1&&b("keydown.escape",function(){return i.onEscapeClick()},!1,In)("click",function(s){return i.onClickOutside(s)},!1,In)},inputs:{fonds:"fonds",index:"index",tooltipBoundary:"tooltipBoundary"},outputs:{errored:"errored"},decls:9,vars:4,consts:[["button_container",""],["loadingSpinner",""],["id","buttonWrapper",1,"d-flex"],[1,"toolbar-anchor"],["vhButton","","variant","borderless","tabindex","0",3,"click"],["name","vh-ic_menue-mehr-vertikal_24"],[3,"position",4,"ngIf"],[3,"position"],["class","document-list-wrapper",4,"ngIf","ngIfElse"],[1,"document-list-wrapper"],[3,"title",4,"ngFor","ngForOf"],[3,"title"],["tabindex","0",1,"document-link",3,"click","disabled","ngClass"],["name","vh-ic_download_24"],[1,"spacer-left"]],template:function(n,i){if(n&1){let o=Y();l(0,"div",2)(1,"div",3,0)(3,"button",4),b("click",function(){R(o);let m=qt(2);return D(i.openDocumentContextMenu(m))}),U(4,"vh-icon",5),c(),y(5,oc,2,4,"fnsrch-tooltip",6),d(6,"async"),c(),y(7,ac,1,0,"ng-template",null,1,go),c()}n&2&&(a(3),nt("data-test-id","fond-dokument-"+i.index),a(2),p("ngIf",f(6,2,i.showTooltip$)))},dependencies:[Ut,Pt,q,tn,Ao,Vt,Ha,Ve],styles:[".document-list-wrapper[_ngcontent-%COMP%]{min-width:250px}.document-list-wrapper[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0}.document-list-wrapper[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{margin-bottom:1px}.document-list-wrapper[_ngcontent-%COMP%]   .document-link[_ngcontent-%COMP%]{border:0;background-color:inherit;display:block;padding:3px 0;color:var(--color-group-vh-134);text-decoration:none}.document-list-wrapper[_ngcontent-%COMP%]   .document-link.disabled[_ngcontent-%COMP%]{color:var(--color-group-vh-203);pointer-events:none;cursor:default;opacity:.7}.document-list-wrapper[_ngcontent-%COMP%]   .spacer-left[_ngcontent-%COMP%]{padding-left:10px}.toolbar-anchor[_ngcontent-%COMP%]{position:relative}"]})}return e})(),vn=function(e){return e[e.GENERIC_ERROR=0]="GENERIC_ERROR",e[e.MISSING_DOCUMENT_ERROR=1]="MISSING_DOCUMENT_ERROR",e}(vn||{}),Pe=function(e){return e.VV_FPV="VV_FPV",e.VV_AB="VV_AB",e.MEININVEST="MEININVEST",e.VERMOEGENPLUS="VERMOEGENPLUS",e.BANKENINDIVIDUELL="BANKENINDIVIDUELL",e.UNIONDEPOTCLASSIC="UNIONDEPOTCLASSIC",e.FIRMENKUNDEN_FPV="FIRMENKUNDEN_FPV",e.UNIONDEPOTKOMFORT="UNIONDEPOTKOMFORT",e.FIRMENKUNDEN_BIS="FIRMENKUNDEN_BIS",e.UNBEKANNT="UNBEKANNT",e}(Pe||{}),ft=function(e){return e.PUBLIC_FOND_OFFEN="A",e.ETF="E",e.ETC="Y",e.ELTIF="EL",e.FREMDFOND="F",e.PRIVATE_LABEL_FONDS="L",e.PROVISIONSFREI="0",e.OTHER="OTHER",e}(ft||{}),Cc=(()=>{class e{isSparplanfaehig;fondsart;fondstypBezeichnung;isVlFoerderfaehig;isValidFondstypBezeichnung(){return!!this.fondstypBezeichnung&&Tc.includes(this.fondstypBezeichnung)}mappedFondsTypBezeichnung(){return this.fondstypBezeichnung==="Alternative Anlage-Instrumente"?"Alternative Anlage":this.fondstypBezeichnung}FondsArt=ft;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=P({type:e,selectors:[["fnsrch-bagde-list"]],inputs:{isSparplanfaehig:"isSparplanfaehig",fondsart:"fondsart",fondstypBezeichnung:"fondstypBezeichnung",isVlFoerderfaehig:"isVlFoerderfaehig"},decls:6,vars:5,consts:[[1,"badge-list"],["class","badge-item","data-test-id","bagde__fondstyp",4,"ngIf"],["class","badge-item","data-test-id","bagde__etf",4,"ngIf"],["class","badge-item","data-test-id","bagde__eltif",4,"ngIf"],["class","badge-item","data-test-id","bagde__sparplan",4,"ngIf"],["class","badge-item","data-test-id","badge__vl",4,"ngIf"],["data-test-id","bagde__fondstyp",1,"badge-item"],[1,"badge-item--content"],["data-test-id","bagde__etf",1,"badge-item"],["data-test-id","bagde__eltif",1,"badge-item"],["data-test-id","bagde__sparplan",1,"badge-item"],["data-test-id","badge__vl",1,"badge-item"]],template:function(n,i){n&1&&(l(0,"ol",0),y(1,sc,3,1,"li",1)(2,lc,4,3,"li",2)(3,cc,4,3,"li",3)(4,pc,4,3,"li",4)(5,uc,4,3,"li",5),c()),n&2&&(a(),p("ngIf",i.isValidFondstypBezeichnung()&&i.fondsart!==i.FondsArt.ETF&&i.fondsart!==i.FondsArt.ELTIF),a(),p("ngIf",i.fondsart===i.FondsArt.ETF),a(),p("ngIf",i.fondsart===i.FondsArt.ELTIF),a(),p("ngIf",i.isSparplanfaehig),a(),p("ngIf",i.isVlFoerderfaehig))},dependencies:[q,Z],styles:[".badge-item[_ngcontent-%COMP%]{display:inline-block;font-size:var(--vh-font-size-10);font-family:var(--vh-font-family-10);font-weight:var(--vh-font-weight-10);background-color:var(--color-group-55);border-radius:5px}.badge-item--content[_ngcontent-%COMP%]{color:var(--color-group-13);margin:3px 12px}ol.badge-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding-left:0}"]})}return e})(),Tc=["Aktienfonds","Lebenszyklusfonds","Dachfonds","Geldmarktfonds","Hedgefonds","Offene Immobilienfonds","Mischfonds","Sachwertefonds","Rentenfonds","Sonstige Wertpapierfonds","Wertgesicherte Fonds","Alternative Anlage-Instrumente","Hybridfonds","Zielvorgabefonds"],Ic=(()=>{class e{transform(r,n){return new Intl.NumberFormat("de-DE",{minimumFractionDigits:2,maximumFractionDigits:2}).format(Number(r))}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=Tn({name:"customCurrency",type:e,pure:!0})}return e})(),bc=(()=>{class e{transform(r,n){return new Intl.NumberFormat("de-DE",{minimumFractionDigits:0,maximumFractionDigits:2}).format(Number(r))}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=Tn({name:"customPercent",type:e,pure:!0})}return e})(),Oc=(()=>{class e{fondsManager;foundFonds;showServiceUnavailableNotification;showNoResultFoundNotification;ausgabeaufschlagAnzeigen;searchQuery;offsetToTop;ignoreClick=!1;showGenericError=!1;constructor(r){this.fondsManager=r}handleClickedFond(r){if(this.ignoreClick){this.ignoreClick=!1;return}this.fondsManager.addFonds(r)}isSelected(r){return this.fondsManager.containsFonds(r)}openNewTabWithoutSelectFond(r){r.stopPropagation()}handleDocumentError(r){switch(r.type){case vn.GENERIC_ERROR:this.showGenericError=!0;break;case vn.MISSING_DOCUMENT_ERROR:break}}static \u0275fac=function(n){return new(n||e)(x(Bi))};static \u0275cmp=P({type:e,selectors:[["fnsrch-resultslist"]],inputs:{foundFonds:"foundFonds",showServiceUnavailableNotification:"showServiceUnavailableNotification",showNoResultFoundNotification:"showNoResultFoundNotification",ausgabeaufschlagAnzeigen:"ausgabeaufschlagAnzeigen",searchQuery:"searchQuery",offsetToTop:"offsetToTop"},decls:16,vars:23,consts:[["scrollingContext",""],[4,"ngIf"],["type","error",1,"spaced-to-searchbar",3,"visibleChange","visible"],["type","information",1,"spaced-to-searchbar",3,"visibleChange","visible"],["class","spaced-to-searchbar",4,"ngIf"],["data-test-id","search_fund_generic_error","type","error",1,"spaced-to-searchbar",3,"headline","visible"],[1,"stick-to-top",3,"ngClass"],[1,"name"],[1,"isin"],[3,"ngClass"],[1,"ausgabepreis"],[1,"dokumente"],[1,"search-results-list","margin-x"],["class","vh-box vh-box__shadow","tabindex","0",3,"ngClass","click","keydown.space","keydown.enter",4,"ngFor","ngForOf"],["tabindex","0",1,"vh-box","vh-box__shadow",3,"click","keydown.space","keydown.enter","ngClass"],[1,"badges"],[3,"isSparplanfaehig","fondsart","fondstypBezeichnung","isVlFoerderfaehig"],[1,"name","highlight-text"],["target","\u201D_blank\u201D","rel","noopener",3,"href","click",4,"ngIf"],[1,"kvgname"],[1,"wkn"],[1,"labels-only-mobile","isin-wkn"],[1,"labels-only-mobile"],[1,"ausgabepreis","highlight-text"],[1,"fond__mb-1","dokumente"],[1,"dokumente-button"],[3,"click","keydown","errored","fonds","tooltipBoundary","index"],["target","\u201D_blank\u201D","rel","noopener",3,"click","href"],[1,"align-icon-to-text","vh-icon","vh-ic_neues-fenster_24"],[1,"spaced-to-searchbar"],["data-test-id","search_fund_max_selected","type","warning",3,"headline"]],template:function(n,i){if(n&1&&(y(0,gc,23,25,"div",1),d(1,"async"),d(2,"async"),l(3,"vh-notification",2),St("visibleChange",function(s){return vt(i.showServiceUnavailableNotification,s)||(i.showServiceUnavailableNotification=s),s}),_(4),d(5,"translate"),c(),l(6,"vh-notification",3),St("visibleChange",function(s){return vt(i.showNoResultFoundNotification,s)||(i.showNoResultFoundNotification=s),s}),_(7),d(8,"translate"),d(9,"translate"),c(),y(10,hc,8,10,"ng-container",4),l(11,"vh-notification",5),d(12,"translate"),l(13,"p"),_(14),d(15,"translate"),c()()),n&2){let o;p("ngIf",f(1,9,i.foundFonds)&&((o=f(2,11,i.foundFonds))==null?null:o.length)&&!i.showGenericError&&!i.showNoResultFoundNotification&&!i.showServiceUnavailableNotification&&!(i.fondsManager.isFull()&&i.fondsManager.allowsMultiSelection())),a(3),Et("visible",i.showServiceUnavailableNotification),a(),M(" ",f(5,13,"FNSRC__NOT_AVAILABLE_ERROR_MSG"),`
`),a(2),Et("visible",i.showNoResultFoundNotification),a(),M(" ",f(8,15,"FNSRC__RESULT_NOT_FOUND_BY_SEARCHTERM_MSG_1")+((i.searchQuery==null?null:i.searchQuery.searchTerm)||"???")+f(9,17,"FNSRC__RESULT_NOT_FOUND_BY_SEARCHTERM_MSG_2"),`
`),a(3),p("ngIf",i.fondsManager.isFull()&&i.fondsManager.allowsMultiSelection()),a(),p("headline",f(12,19,"FNSRC__GENERIC_ERROR_TITLE"))("visible",i.showGenericError),a(3),A(f(15,21,"FNSRC__GENERIC_ERROR_MSG"))}},dependencies:[Ut,Pt,q,Oe,Sc,Cc,Ve,Z,Ic,bc],styles:['.header[_ngcontent-%COMP%]{display:grid;grid-gap:8px 16px;grid-template-columns:.75fr .4fr .3fr .3fr .2fr;grid-template-areas:"name isin ausgabeaufschlag ausgabepreis dokumente";font-size:var(--vh-font-size-10);padding:8px 28px 0}.header__ausgabeaufschlag-invisible[_ngcontent-%COMP%]{display:grid;grid-gap:8px 16px;grid-template-columns:.75fr .4fr .4fr .2fr;grid-template-areas:"name isin ausgabepreis dokumente";font-size:var(--vh-font-size-10);padding:8px 28px 0}.header[_ngcontent-%COMP%]   .dokumente[_ngcontent-%COMP%]{display:block}.margin-x[_ngcontent-%COMP%]{margin:0 12px}.spaced-to-searchbar[_ngcontent-%COMP%]{margin:24px 12px 0}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin-top:8px}ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{padding:16px;font-size:var(--vh-font-size-7);font-weight:var(--vh-font-weight-10);word-break:break-word}ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:hover{box-shadow:0 5px 30px #28282833;cursor:pointer}ul[_ngcontent-%COMP%]   li.fond-is-selected[_ngcontent-%COMP%]{border:2px solid var(--color-group-5);margin:-2px}ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:not(:last-child){margin-bottom:16px}.card-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:.75fr .4fr .3fr .3fr .2fr;grid-template-areas:"badges badges badges badges dokumente" "name isin ausgabeaufschlag ausgabepreis dokumente" "kvgName wkn . . dokumente";grid-gap:8px 16px}.card-content__ausgabeaufschlag-invisible[_ngcontent-%COMP%]{display:grid;grid-gap:8px 16px;grid-template-columns:.75fr .4fr .4fr .2fr;grid-template-areas:"badges badges badges dokumente" "name isin ausgabepreis dokumente" "kvgName wkn . dokumente"}.badges[_ngcontent-%COMP%]{grid-area:badges}.name[_ngcontent-%COMP%]{grid-area:name}.name[_ngcontent-%COMP%]   span.align-icon-to-text[_ngcontent-%COMP%]{margin-left:4px;margin-top:-.3rem}.name[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:link, .name[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:visited{text-decoration:none}.name[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{text-decoration:underline}.kvgname[_ngcontent-%COMP%]{grid-area:kvgName}.isin[_ngcontent-%COMP%]{grid-area:isin}.wkn[_ngcontent-%COMP%]{grid-area:wkn}.highlight-text[_ngcontent-%COMP%]{font-size:var(--vh-font-size-7);font-weight:var(--vh-font-weight-7);margin-bottom:0}.ausgabeaufschlag[_ngcontent-%COMP%]{grid-area:ausgabeaufschlag}.ausgabeaufschlag__invisible[_ngcontent-%COMP%]{display:none}.ausgabepreis[_ngcontent-%COMP%]{grid-area:ausgabepreis}.dokumente[_ngcontent-%COMP%]{grid-area:dokumente;display:flex;align-items:center}.tooltip-container[_ngcontent-%COMP%]{position:relative}.labels-only-mobile[_ngcontent-%COMP%]{display:none;margin-bottom:8px}@media only screen and (width <= 768px){.labels-only-mobile[_ngcontent-%COMP%]{display:block;margin-bottom:0}.dokumente[_ngcontent-%COMP%]{justify-self:right;align-items:start}.dokumente[_ngcontent-%COMP%]   .dokumente-button[_ngcontent-%COMP%]{margin-top:-10px}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0}ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.header[_ngcontent-%COMP%], .header__ausgabeaufschlag-invisible[_ngcontent-%COMP%]{display:none}.card-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1.2fr .6fr;grid-template-areas:"badges dokumente" "name ausgabepreis" "kvgName kvgName" "isinwkn isinwkn" "ausgabeaufschlag ausgabeaufschlag"}.card-content__ausgabeaufschlag-invisible[_ngcontent-%COMP%]{display:grid;grid-template-columns:1.2fr .6fr;grid-template-areas:"badges dokumente" "name ausgabepreis" "kvgName kvgName" "isinwkn isinwkn"}.isin[_ngcontent-%COMP%], .wkn[_ngcontent-%COMP%]{display:none}.isin-wkn[_ngcontent-%COMP%]{grid-area:isinwkn}.ausgabepreis[_ngcontent-%COMP%]{grid-area:ausgabepreis;text-align:right}.dokumente-button[_ngcontent-%COMP%]{float:right}.spaced-to-searchbar[_ngcontent-%COMP%]{margin:24px 4px 0}.margin-x[_ngcontent-%COMP%]{margin:0 4px}}.stick-to-top[_ngcontent-%COMP%]{background-color:var(--color-group-53);position:sticky;z-index:1}.search-results-list[_ngcontent-%COMP%]{position:relative}']})}return e})(),Nc=(()=>{class e{initialSearchValue;currentlySearching$;foundFonds$;controlsDisabled$;showServiceUnavailableNotification;showNoResultFoundNotification;isLoading$;ausgabeaufschlagAnzeigen;showUnionInvestFondsOnlyToggle;isVl=!1;query;searchQuery=new tt;onSearchEvent(r){this.query=r,this.searchQuery.emit(r)}of=F;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=P({type:e,selectors:[["fnsrch-fondssuche-comp"]],inputs:{initialSearchValue:"initialSearchValue",currentlySearching$:"currentlySearching$",foundFonds$:"foundFonds$",controlsDisabled$:"controlsDisabled$",showServiceUnavailableNotification:"showServiceUnavailableNotification",showNoResultFoundNotification:"showNoResultFoundNotification",isLoading$:"isLoading$",ausgabeaufschlagAnzeigen:"ausgabeaufschlagAnzeigen",showUnionInvestFondsOnlyToggle:"showUnionInvestFondsOnlyToggle",isVl:"isVl"},outputs:{searchQuery:"searchQuery"},decls:5,vars:15,consts:[["searchbar",""],[1,"stick-to-top"],[3,"searchQuery","initialSearchValue","currenltySearching$","controlsDisabled$","isLoading","showServiceUnavailableNotification","showUnionInvestFondsOnlyToggle","isVl"],[3,"foundFonds","showServiceUnavailableNotification","showNoResultFoundNotification","ausgabeaufschlagAnzeigen","searchQuery","offsetToTop"]],template:function(n,i){if(n&1){let o=Y();l(0,"div",1,0)(2,"fnsrch-searchbar",2),d(3,"async"),b("searchQuery",function(m){return R(o),D(i.onSearchEvent(m))}),c()(),U(4,"fnsrch-resultslist",3)}if(n&2){let o=qt(1);a(2),p("initialSearchValue",i.initialSearchValue)("currenltySearching$",i.currentlySearching$)("controlsDisabled$",i.controlsDisabled$)("isLoading",f(3,13,i.isLoading$))("showServiceUnavailableNotification",i.showServiceUnavailableNotification)("showUnionInvestFondsOnlyToggle",i.showUnionInvestFondsOnlyToggle)("isVl",i.isVl),a(2),p("foundFonds",i.foundFonds$)("showServiceUnavailableNotification",i.showServiceUnavailableNotification)("showNoResultFoundNotification",i.showNoResultFoundNotification)("ausgabeaufschlagAnzeigen",i.ausgabeaufschlagAnzeigen)("searchQuery",i.query)("offsetToTop",o.offsetHeight)}},dependencies:[Ec,Oc,Ve],styles:[".stick-to-top[_ngcontent-%COMP%]{background-color:var(--color-group-53);position:sticky;top:0;z-index:2}"]})}return e})(),Ka=(()=>{class e{http;urlProvider;MAX_SEARCH_RESULTS=100;constructor(r,n){this.http=r,this.urlProvider=n}sucheFonds$(r){let n=new Qn().set("searchTerm",r.searchTerm).set("maxResults",this.MAX_SEARCH_RESULTS.toString()).set("unionOnly",r.unionFondsOnly.toString()).set("excludeEtfs",!r.includeEtfs).set("productType",r.produktType).set("vlDepot",r.vlDepot);return this.http.get(this.urlProvider.getFondssucheUrl(),{params:n})}static \u0275fac=function(n){return new(n||e)(h(ae),h(jr))};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ja=(()=>{class e{fondssucheService;_currentlySearching=new et(!1);_fondResults=new et(void 0);ignoreSearchResultBecauseOfReset=!1;prohibitedIsin;isServiceUnavailableError=!1;hasNotFoundSerchTerm=!1;includeEtfs=!1;produktTyp=Pe.UNBEKANNT;vlDepot=!1;constructor(r){this.fondssucheService=r}reset(r,n,i,o){this.produktTyp=i,this.prohibitedIsin=r,this.ignoreSearchResultBecauseOfReset=!0,this.isServiceUnavailableError=!1,this.hasNotFoundSerchTerm=!1,this._fondResults.next(void 0),this._currentlySearching.next(!1),this.includeEtfs=n,this.vlDepot=o}get fondResults$(){return this._fondResults.asObservable()}get currentlySearching$(){return this._currentlySearching.asObservable()}get showServiceUnavailableNotification(){return this.isServiceUnavailableError}get showNoResultFoundNotification(){return this.hasNotFoundSerchTerm}sucheFonds$(r){this.ignoreSearchResultBecauseOfReset=!1,this._currentlySearching.next(!0),this.isServiceUnavailableError=!1,this.hasNotFoundSerchTerm=!1,this.fondssucheService.sucheFonds$(Qe(ge({},r),{includeEtfs:this.includeEtfs,produktType:this.produktTyp,vlDepot:this.vlDepot})).pipe(v(n=>{let i=n.filter(o=>this.prohibitedIsin!==o.isin);return i?.length===0&&(this.hasNotFoundSerchTerm=!0),i.map(o=>Ac(o,this.vlDepot))}),N(()=>{this._currentlySearching.next(!1)}),Ue(n=>!this.ignoreSearchResultBecauseOfReset)).subscribe({next:n=>this._fondResults.next(n),error:n=>{this.isServiceUnavailableError=!!n,this._currentlySearching.next(!1)}})}static \u0275fac=function(n){return new(n||e)(h(Ka))};static \u0275prov=C({token:e,factory:e.\u0275fac})}return e})();function Ac(e,t=!1){return{name:e.name,isin:e.isin,wkn:e.wkn,kvgName:e.kvgName,portraitUrl:e.portraitUrl,isUnionFonds:e.unionFund,preis:{datum:new Date(e.lastDatePrice),waehrung:e.lastPriceCurrency,betrag:e.lastPrice},ruecknahmePreis:{datum:new Date(e.lastDatePrice),waehrung:e.ruecknahmePreisWaehrung,betrag:e.ruecknahmePreis},priceDatePlus:e.priceDatePlus,isSparplanfaehig:e.savingPlanKZ==="J",ausgabeAufschlag:e.upfrontFee,alternativeInvestmentFundsKZ:e.alternativeInvestmentFundsKZ,fondsart:yc(e.fondsartKZ),fondstypBezeichnung:e.fondstypBezeichnung,vlFoerderfaehig:t?e.vlFoerderfaehig:void 0}}function yc(e){switch(e){case"A":return ft.PUBLIC_FOND_OFFEN;case"E":return ft.ETF;case"Y":return ft.ETC;case"EL":return ft.ELTIF;case"F":return ft.FREMDFOND;case"L":return ft.PRIVATE_LABEL_FONDS;case"0":return ft.PROVISIONSFREI;default:return ft.OTHER}}var zi=(()=>{class e{fondssucheContainerFeatureModel;fondsManager;allowMultiSelection=!0;maxFonds=10;initialSearchString="";prohibitedIsin;showUnionInvestFondsOnlyToggle=!0;produktTyp=Pe.UNBEKANNT;controlsDisabled$=F(!0);includeEtfs;ausgabeaufschlagAnzeigen;isVl=!1;includeEtfsWithFallback=!1;ausgabeaufschlagAnzeigenWithFallback=!1;selectedFonds=new tt;selectedFond=new tt;constructor(r,n){this.fondssucheContainerFeatureModel=r,this.fondsManager=n}get currentlySearching$(){return this.fondssucheContainerFeatureModel.currentlySearching$}get foundFonds$(){return this.fondssucheContainerFeatureModel.fondResults$}ngOnChanges(){this.setup()}setup(){this.setupInputs(),this.setupSubsystems(),this.setupEventPropagation()}setupInputs(){this.includeEtfsWithFallback=this.includeEtfs??this.produktTyp===Pe.UNIONDEPOTKOMFORT,this.ausgabeaufschlagAnzeigenWithFallback=this.ausgabeaufschlagAnzeigen??this.produktTyp!==Pe.UNIONDEPOTKOMFORT}setupSubsystems(){this.fondssucheContainerFeatureModel.reset(this.prohibitedIsin,this.includeEtfsWithFallback,this.produktTyp,this.isVl),this.fondsManager.setup(this.allowMultiSelection,this.controlsDisabled$,this.maxFonds)}setupEventPropagation(){this.fondsManager.allFonds$().pipe(v(r=>this.allowMultiSelection?this.selectedFonds.emit(r):this.testAndEmitSingleFond(r))).subscribe()}triggerSearch(r){this.fondssucheContainerFeatureModel.sucheFonds$(r)}testAndEmitSingleFond(r){r.length===1&&this.selectedFond.emit(r[0])}static \u0275fac=function(n){return new(n||e)(x(ja),x(Bi))};static \u0275cmp=P({type:e,selectors:[["fnsrch-fondssuche-container"]],inputs:{allowMultiSelection:"allowMultiSelection",maxFonds:"maxFonds",initialSearchString:"initialSearchString",prohibitedIsin:"prohibitedIsin",showUnionInvestFondsOnlyToggle:"showUnionInvestFondsOnlyToggle",produktTyp:"produktTyp",controlsDisabled$:"controlsDisabled$",includeEtfs:"includeEtfs",ausgabeaufschlagAnzeigen:"ausgabeaufschlagAnzeigen",isVl:"isVl"},outputs:{selectedFonds:"selectedFonds",selectedFond:"selectedFond"},features:[ao],decls:1,vars:10,consts:[[3,"searchQuery","initialSearchValue","currentlySearching$","foundFonds$","controlsDisabled$","showServiceUnavailableNotification","showNoResultFoundNotification","showUnionInvestFondsOnlyToggle","isLoading$","ausgabeaufschlagAnzeigen","isVl"]],template:function(n,i){n&1&&(l(0,"fnsrch-fondssuche-comp",0),b("searchQuery",function(s){return i.triggerSearch(s)}),c()),n&2&&p("initialSearchValue",i.initialSearchString)("currentlySearching$",i.currentlySearching$)("foundFonds$",i.foundFonds$)("controlsDisabled$",i.controlsDisabled$)("showServiceUnavailableNotification",i.fondssucheContainerFeatureModel==null?null:i.fondssucheContainerFeatureModel.showServiceUnavailableNotification)("showNoResultFoundNotification",i.fondssucheContainerFeatureModel==null?null:i.fondssucheContainerFeatureModel.showNoResultFoundNotification)("showUnionInvestFondsOnlyToggle",i.showUnionInvestFondsOnlyToggle)("isLoading$",i.currentlySearching$)("ausgabeaufschlagAnzeigen",i.ausgabeaufschlagAnzeigenWithFallback)("isVl",i.isVl)},dependencies:[Nc],encapsulation:2})}return e})(),Hi=(()=>{class e{static forServiceportal(){return{ngModule:e,providers:[{provide:Ga,useValue:!0}]}}static \u0275fac=function(n){return new(n||e)};static \u0275mod=oo({type:e});static \u0275inj=ro({providers:[Ka,$a,Bi,jr,ja],imports:[vo,Ne,ot,X,ni,ri,oi,yo,Oo,Be]})}return e})();var Gi=(()=>{let t=class t{constructor(n){this.fondsSucheViewModel=n,this.disableAllControls$=new et(!1)}checkUmtausch$(n){return this.disableAllControls$.next(!0),this.fondsSucheViewModel.enrichWithUnterDepotInformation(n).pipe(de(i=>i.pruefeNeukaufMoeglich$()),N(i=>this.disableAllControls$.next(!1)))}checkAndEnrich$(n){return this.fondsSucheViewModel.enrichWithUnterDepotInformation(n).pipe(N(()=>this.disableAllControls$.next(!0)),de(i=>this.toPruefungsErgebnisAndFonds(i)),N(i=>this.disableAllControls$.next(!1)))}toPruefungsErgebnisAndFonds(n){return n.pruefeNeukaufMoeglich$().pipe(v(i=>({fonds:n,pruefungsErgebnis:i})))}showAusgabeAufschlag(){return this.fondsSucheViewModel.showAusgabeAufschlag()}getProduktTypeFondsucheProduktType$(){return this.fondsSucheViewModel.getProductType$().pipe(v(Mc))}};t.\u0275fac=function(i){return new(i||t)(h(Ai))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function Mc(e){switch(e){case Dt.VV:return Pe.VV_FPV;case Dt.MEININVEST:return Pe.MEININVEST;case Dt.VERMOEGENPLUS:return Pe.VERMOEGENPLUS;case Dt.BANKENINDIVIDUELL:return Pe.BANKENINDIVIDUELL;case Dt.UNIONDEPOTCLASSIC:return Pe.UNIONDEPOTCLASSIC;case Dt.FIRMENKUNDEN_FPV:return Pe.FIRMENKUNDEN_FPV;case Dt.UNIONDEPOTKOMFORT:return Pe.UNIONDEPOTKOMFORT;default:return Pe.UNBEKANNT}}var xc=e=>({"umtausch-disable-scrollbar":e});function Fc(e,t){e&1&&(l(0,"vh-notification",7),_(1),d(2,"translate"),c()),e&2&&(a(),M(" ",f(2,1,"UMTAUSCH_NEW_FONDS_NO_SELECTION")," "))}var Xa=(()=>{let t=class t extends ie{constructor(n,i,o){super(),this.modalService=n,this.fondsSucheViewModel=i,this.overlayService=o,this.buttonConfigs={nextButton:{dataTestId:"umtausch-new-fonds-next-button"},specialButton:{dataTestId:"umtausch-fonds-suche-back-button",textLabel:"ANLAGEZIEL-TRANSAKTION--BACK"},abortButton:{dataTestId:"umtausch-fonds-suche-abort-button"}},this.showNoSelectionOverlay=!1,this.UMTAUSCH_FEHLENDE_DOKUMENTE=gn,this.UMTAUSCH_ZIELMARKTKONFLIKTE=hn,this.CLOSE_REASON=K,this.showAusgabeAufschlag=this.fondsSucheViewModel.showAusgabeAufschlag(),this.produkttyp$=this.fondsSucheViewModel.getProduktTypeFondsucheProduktType$()}get disableAllControls$(){return this.fondsSucheViewModel.disableAllControls$}onBack(){this.navigateTo.emit(xe.SELECT_NEW_OR_EXISTING)}setFonds(n){this.currentFonds=n}checkFonds(){if(!this.currentFonds){this.showNoSelectionOverlay=!0;let n=document.getElementById("scrolling-element");n.scrollTop=0;return}this.checkingFonds=!0,this.fondsSucheViewModel.checkUmtausch$(this.currentFonds).pipe(oe(1)).subscribe(n=>{this.checkingFonds=!1,this.handleNeukaufPruefung(n)})}handleNeukaufPruefung(n){switch(n){case re.ERFOLG:this.model.fondsToTradeIn={isin:this.currentFonds.isin,name:this.currentFonds.name,priceDatePlus:this.currentFonds.priceDatePlus},this.model.strategy=new ki,this.navigateTo.emit(xe.SELECT_AMOUNT);break;case re.FEHLENDE_VERKAUFSUNTERLAGEN:this.modalService.open(gn.overlayId);break;case re.FEHLENDE_ZIELMARKTINFORMATIONEN:this.modalService.open(hn.overlayId);break;default:this.overlayService.showGeneralErrorModal()}}hideScrollbar(){let n=document.getElementById("umtausch-fondssuche-container").offsetHeight,i=document.getElementById("scrolling-element").offsetHeight;return n<=i}};t.\u0275fac=function(i){return new(i||t)(x(at),x(Gi),x(on))},t.\u0275cmp=P({type:t,selectors:[["app-umtausch-new-fonds-suche-step"]],standalone:!0,features:[W,G],decls:12,vars:26,consts:[[3,"title","subheader"],[3,"title","removeBorderOnMobile","ngClass"],["id","scrolling-element",1,"vl-neukauf-fnsrch-content-delimiter"],["class","mrg-b-4-bd","type","error",4,"ngIf"],["id","umtausch-fondssuche-container",3,"selectedFond","allowMultiSelection","prohibitedIsin","ausgabeaufschlagAnzeigen","controlsDisabled$","includeEtfs","produktTyp"],[3,"specialButton","abortButton","nextButton","pending","buttonConfigs"],[3,"transactionType"],["type","error",1,"mrg-b-4-bd"]],template:function(i,o){i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),d(2,"translate"),l(3,"or-ui-transaktion-card",1),d(4,"translate"),l(5,"div",2),y(6,Fc,3,3,"vh-notification",3),l(7,"fnsrch-fondssuche-container",4),d(8,"async"),b("selectedFond",function(m){return o.setFonds(m)}),c()()(),l(9,"or-ui-transaktion-button-group",5),b("specialButton",function(){return o.onBack()})("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("nextButton",function(){return o.checkFonds()}),c()(),U(10,"app-transaktion-error-modal",6)(11,"app-transaktion-error-modal",6)),i&2&&(p("title",f(1,16,"FONDS_UMTAUSCH_TITEL"))("subheader",f(2,18,"UMTAUSCH_NEUER_FONDS_CATCH_PHRASE")),a(3),p("title",f(4,20,"UMTAUSCH_NEUER_FONDS_CTA_TEXT"))("removeBorderOnMobile",!0)("ngClass",he(24,xc,o.hideScrollbar())),a(3),p("ngIf",o.showNoSelectionOverlay),a(),p("allowMultiSelection",!1)("prohibitedIsin",o.model.sourceUnterdepot.isin)("ausgabeaufschlagAnzeigen",o.showAusgabeAufschlag)("controlsDisabled$",o.disableAllControls$)("includeEtfs",!1)("produktTyp",f(8,22,o.produkttyp$)),a(2),p("pending",o.checkingFonds)("buttonConfigs",o.buttonConfigs),a(),p("transactionType",o.UMTAUSCH_FEHLENDE_DOKUMENTE),a(),p("transactionType",o.UMTAUSCH_ZIELMARKTKONFLIKTE))},dependencies:[Hi,zi,Ut,q,Ve,X,Z,ne,_n,Ne,Oe,te,ee],styles:[".hide[_ngcontent-%COMP%]{display:none}.icon-attention-red[_ngcontent-%COMP%]{color:var(--color-group-35);font-size:20px}.form-control-error[_ngcontent-%COMP%]   i.icon.icon-attention-red[_ngcontent-%COMP%]{color:unset}.text-align-right[_ngcontent-%COMP%]{text-align:right}.text-align-center[_ngcontent-%COMP%]{text-align:center}.flow-text[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.headline[_ngcontent-%COMP%]{text-align:center}.h1-order[_ngcontent-%COMP%], .h2[_ngcontent-%COMP%], .h3[_ngcontent-%COMP%], .h4[_ngcontent-%COMP%]{margin-bottom:20px;font-weight:700}.h1-order[_ngcontent-%COMP%]{color:var(--color-group-1);font-family:var(--vh-font-family-1);font-weight:var(--vh-font-weight-1);text-transform:var(--vh-text-transform-1);font-size:var(--vh-font-size-1);line-height:var(--vh-line-height-1)}@media (min-width: 1440px){.h1-order[_ngcontent-%COMP%]{font-size:48px}}.h2-order-details-headline[_ngcontent-%COMP%]{color:var(--color-group-69);font-family:var(--vh-font-family-2);font-weight:var(--vh-font-weight-2);text-transform:var(--vh-text-transform-2);font-size:var(--vh-font-size-2);line-height:var(--vh-line-height-2)}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:20px}.margin-complete-component[_ngcontent-%COMP%]{margin:40px 0}.radio-seperator[_ngcontent-%COMP%]{margin:0 10px;color:var(--color-group-69);font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.document-downloaded[_ngcontent-%COMP%]{color:var(--color-group-33)}@media screen and (width <= 767px){.button[_ngcontent-%COMP%]{margin-left:0;margin-right:0}}.mrg-b-1-bd[_ngcontent-%COMP%]{margin-bottom:4px}.mrg-b-2-bd[_ngcontent-%COMP%]{margin-bottom:8px}.mrg-b-4-bd[_ngcontent-%COMP%]{margin-bottom:16px}.mrg-b-6-bd[_ngcontent-%COMP%]{margin-bottom:24px}.mrg-b-8-bd[_ngcontent-%COMP%]{margin-bottom:32px}.mrg-b-10-bd[_ngcontent-%COMP%]{margin-bottom:40px}.mrg-t-3-bd[_ngcontent-%COMP%]{margin-top:16px}.mrg-t-6-bd[_ngcontent-%COMP%]{margin-top:24px}.mrg-t-7-bd[_ngcontent-%COMP%]{margin-top:28px}.mrg-t-8-bd[_ngcontent-%COMP%]{margin-top:32px}.mrg-t-12-bd[_ngcontent-%COMP%]{margin-top:48px}.details-margin-top[_ngcontent-%COMP%]{margin-top:40px}.confirmation-subline[_ngcontent-%COMP%]{font-size:16px}.subline[_ngcontent-%COMP%]{text-align:center;font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.container-fluid[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px;max-width:1260px;margin-left:auto;margin-right:auto}@media (width >= 768px){.container-fluid[_ngcontent-%COMP%]{padding-left:30px;padding-right:30px}}main[_ngcontent-%COMP%]{min-height:calc(100vh - 200px)}.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:8px}@media (min-width: 768px){.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:16px}}.margin-labeled-content[_ngcontent-%COMP%]:last-child{margin-bottom:0}.mt-between-boxes[_ngcontent-%COMP%]{margin-top:24px}@media (width >= 768px){.mt-between-boxes[_ngcontent-%COMP%]{margin-top:30px}}.button-group[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}@media (width <= 576px){.button-group[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.fnsrch-content-delimiter[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{display:none}@media (min-width: 576px){.fnsrch-content-delimiter[_ngcontent-%COMP%]{overflow-y:scroll;max-height:65vh}.fnsrch-content-delimiter[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{display:block}}.umtausch-disable-scrollbar[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.umtausch-disable-scrollbar[_ngcontent-%COMP%]   .fnsrch-content-delimiter[_ngcontent-%COMP%]{scrollbar-width:none}"]});let e=t;return e})();function Pc(e){let t=e,r=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return r===1&&n===0?1:5}var qa=["de",[["AM","PM"],void 0,void 0],void 0,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."],void 0,void 0],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'um' {0}",void 0],[",",".",";","%","+","-","E","\xB7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","Euro",{ATS:["\xF6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],BYN:[void 0,"\u0440."],CUC:[void 0,"Cub$"],DEM:["DM"],FKP:[void 0,"Fl\xA3"],GHS:[void 0,"\u20B5"],GNF:[void 0,"F.G."],KMF:[void 0,"FC"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],RWF:[void 0,"F.Rw"],SYP:[],THB:["\u0E3F"],TWD:["NT$"],XXX:[],ZMW:[void 0,"K"]},"ltr",Pc];var Rc="--FIKU",Dc="--VP",Sn=class Sn{constructor(t){this.translateService=t}transform(t,r=null){return this.getTranslationPriority$().pipe(oe(1),v(n=>{let i=this.getFirstTranslation(n,t,r);return i!==void 0?i:t}))}getFirstTranslation(t,r,n){for(let i of t){let o=this.translate(`${r}${i}`,n);if(o!==void 0)return o}}translate(t,r){let n=this.translateService.instant(t,r?.params);return n!==t?n:void 0}getTranslationPriority$(){return this.productType$.pipe(v(t=>ze("premiumProduct",{productType:t})?Lc(t):[""]))}};Sn.\u0275fac=function(r){return new(r||Sn)(x(pi,16))},Sn.\u0275pipe=Tn({name:"productTranslate",type:Sn,pure:!0,standalone:!0});var Gn=Sn;I([Co(ci.productTypeQuery),u("design:type",j)],Gn.prototype,"productType$",void 0);function Lc(e){let t=[""];return t.unshift(Dc),e==="FIRMENKUNDEN_FPV"&&t.unshift(Rc),t}function $n(e){let t=new Le({});return e.forEach(r=>{t.addControl(r,new Ie({value:!1,disabled:!1},Xn.requiredTrue))}),t}var Ya=(()=>{let t=class t{constructor(n,i,o,s){this.store=n,this.umtauschConfigViewmodel=i,this.sharedCoreViewmodel=o,this.zielmarktkonfliktFeatureModel=s}isTerminierterUmtauschPossible(){return ze("terminierungUmtausch",{productType:this.store.selectSnapshot(ci.productTypeQuery)})}fromUmtauschModel(n){return this.sharedCoreViewmodel.fromUmtauschModel(n)}isUmtauschAlsVerkaufKaufPossible(){return this.sharedCoreViewmodel.enableUmtauschAlsVerkaufKauf()}zielmarktkonflikte$(n){return this.zielmarktkonfliktFeatureModel.zielmarktkonflikte$(n)}config(n){return this.umtauschConfigViewmodel.createUmtauschConfig(n)}load(){return this.sharedCoreViewmodel.load$()}};t.\u0275fac=function(i){return new(i||t)(h($),h(Pi),h(wi),h(di))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function f_(e){if(e.orderCoordinates){let t=e.orderCoordinates.daskaStatus;return t?.majorCode==="1000"&&t.minorCode==="41063"}return!1}function Ja(e){return e.daskaErrorCode?.major===3200&&e.daskaErrorCode?.minor===40189}function g_(e){return e.daskaErrorCode?.major===3200&&e.daskaErrorCode?.minor===40434}function h_(e){return e.daskaErrorCode?.major===3200&&e.daskaErrorCode?.minor===40263}var Qa=(()=>{let t=class t{constructor(n){this.router=n}redirectNavigation(n){let i=/.*\/dashboard\/transactions(?<angularCompatibleUrl>.*)/,o=n.match(i);o?.groups?.angularCompatibleUrl?this.router.navigateByUrl(o.groups.angularCompatibleUrl).then():window.location.href=n}};t.\u0275fac=function(i){return new(i||t)(h(be))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Uc=e=>({mindestBetrag:e}),Vc=e=>({zielfondsName:e});function Bc(e,t){if(e&1&&(l(0,"div",34),U(1,"or-ui-date-picker-with-earliest-possible-button",35),d(2,"translate"),c()),e&2){let r=T();a(),p("nextPossibleDateLabel",f(2,5,"EXCHANGE__NEXT_POSSIBLE_DATE_TEXT"))("datePickerTestId","umtausch-datepicker")("datePickerControl",r.umtauschForm.controls.ausfuehrungstag)("datePickerConfig",r.umtauschConfiguration.dateSelectionConfig)("datePickerLabelKey","EXCHANGE__EXEC_DATE_LABEL")}}function zc(e,t){if(e&1&&(l(0,"span",15),_(1),d(2,"translate"),c()),e&2){let r=T();a(),$e("",f(2,2,"EXCHANGE_PORTFOLIO_HEADER_UNTERDEPOT_NR")," ",r.model.unterdepotIndexToTradeIn,"")}}function Hc(e,t){if(e&1&&(l(0,"vh-labeled-content",36),d(1,"translate"),_(2),d(3,"number"),c()),e&2){let r=T();p("label",f(1,2,"EXCHANGE_INITIAL_FONDS_CURRENT_VALUE__TITLE")),a(2),M(" ",De(3,4,r.getTargetAnlagezielValue(),"1.2-2")," \u20AC ")}}function Gc(e,t){if(e&1&&(l(0,"vh-notification",37),_(1),d(2,"translate"),c()),e&2){let r=t.$implicit;a(),M(" ",De(2,1,r.textKey,r.textParameters)," ")}}function $c(e,t){if(e&1&&(l(0,"div"),U(1,"or-ui-fund-target-market-conflict-container",38),d(2,"async"),c()),e&2){let r=T();a(),p("fundTargetMarketConflicts",f(2,2,r.zielmarktkonflikte$))("angemessenheitPruefungFormGroup",r.angemessenheitsPruefungForm)}}function Kc(e,t){if(e&1&&(l(0,"vh-notification",39),_(1),c()),e&2){let r=T();nt("id",r.ERROR_NOTIFICTION_ELEMENT_ID),a(),M("",r.validationErrorMessage," ")}}function jc(e,t){e&1&&(l(0,"vh-notification",40),_(1),d(2,"translate"),c()),e&2&&(a(),M("",f(2,1,"UMTAUSCH_UNMOEGLICH_BIETE_VERKAUF_KAUF_MESSAGE")," "))}function Zc(e,t){e&1&&(l(0,"li"),_(1),d(2,"translate"),c()),e&2&&(a(),A(f(2,1,"KOMPLETTUMTAUSCH_STEP6")))}_o(qa,"de-DE",{useV3:!0,decimalSeparator:","});var Zr=function(e){return e.JA="Komplettverkauf",e.NEIN="Teilverkauf",e}(Zr||{}),Wc={[lt.UMTAUSCH]:{Komplettverkauf:"KOMPLETTUMTAUSCH_UMTAUSCH_TITLE",Teilverkauf:"FONDS_UMTAUSCH_TITEL"},[lt.VERKAUF_KAUF]:{Komplettverkauf:"KOMPLETTUMTAUSCH_VERKAUF_KAUF_TITLE",Teilverkauf:"UMTAUSCH_VERKAUF_KAUF"}},es=(()=>{let t=class t extends ie{buttonConfigs(){return{nextButton:{dataTestId:"umtausch-abschlie\xDFen",textLabel:this.isKlassischerUmtausch?"ANLAGEZIEL-TRANSAKTION--SUBMIT":"UMTAUSCH_VERKAUF_KAUF"},specialButton:{dataTestId:"umtausch-betrag-schritt-back",textLabel:"ANLAGEZIEL-TRANSAKTION--BACK"},abortButton:{dataTestId:"umtausch-betrag-schritt-abort"}}}constructor(n,i,o,s){super(),this.modalService=n,this.transaktionenRoutingService=i,this.umtauschViewModel=o,this.overlayService=s,this.ERROR_NOTIFICTION_ELEMENT_ID="wizard-fonds-umtausch-select-amount-error-message",this.KOMPLETTVERKAUF_MODAL_ID="komplettverkauf-modal",this.CLOSE_REASON=K,this.notifications=[],this.allowDecimals=!1,this.erstellungPending=!1,this.destroy$=new Te,this.isTerminierterUmtauschPossible=this.umtauschViewModel.isTerminierterUmtauschPossible()}ngOnInit(){this.umtauschConfiguration=this.umtauschViewModel.config(this.model.sourceUnterdepot.unterdepotId),this.createForwardPricingNotifications(),this.setupZielmarktKonflikt$(),this.setupForm()}get headerLabel(){let n=this.umtauschForm.value.performKomplettumtausch?Zr.JA:Zr.NEIN;return Wc[this.model.umtauschArt][n]}get isKlassischerUmtausch(){return this.model.umtauschArt===lt.UMTAUSCH}setupBetragForm(){let n=this.umtauschConfiguration.umtauschValidators;this.mindestBetrag=n.mindestBetrag;let i=new Ie(null,[...n.defaultValidations,n.requiredValidator]);return i.valueChanges.pipe(Re(this.destroy$),io(),Ue(o=>!!o),v(o=>{this.clearErrorMessage(),o>this.model.sourceUnterdepot.aktuellerWert&&i.setValue(Math.floor(this.model.sourceUnterdepot.aktuellerWert),{emitEvent:!1})})).subscribe(),i}setupForm(){let n=new Ie(this.model.ausfuehrungsDatum);n.valueChanges.subscribe(i=>this.clearErrorMessage()),this.umtauschForm=new Le({umtauschBetrag:this.setupBetragForm(),performKomplettumtausch:new Ie(!1),ausfuehrungstag:n}),this.umtauschForm.controls.performKomplettumtausch.valueChanges.pipe(Re(this.destroy$)).subscribe(i=>this.performKomplettumtauschCheckboxChangedValue(i))}getNewAnlagezielValue(){return this.model.sourceUnterdepot.aktuellerWert-this.umtauschForm.controls.umtauschBetrag.value}getTargetAnlagezielFutureValue(){return this.model.strategy.currentAssetValue(this.model)+this.umtauschForm.controls.umtauschBetrag.value}getTargetAnlagezielValue(){return this.model.strategy.currentAssetValue(this.model)}getTargetFonds(){return this.model.strategy.targetFonds(this.model)}clearErrorMessage(){this.validationErrorMessage=void 0}performKomplettumtauschCheckboxChangedValue(n){let i=this.umtauschForm.controls.umtauschBetrag;this.umtauschForm.disabled||(n?(this.allowDecimals=!0,setTimeout(()=>{i.setValue(this.model.sourceUnterdepot.aktuellerWert),i.disable()})):(this.allowDecimals=!1,setTimeout(()=>{i.enable(),i.reset()})),this.clearErrorMessage())}onBack(){this.navigateTo.emit(this.model.strategy.back())}isFormValid(){return(!this.angemessenheitsPruefungForm||this.angemessenheitsPruefungForm.valid)&&!this.validationErrorMessage&&this.umtauschForm.valid}onForward(){if(!this.isFormValid()){this.umtauschForm.markAllAsTouched(),this.angemessenheitsPruefungForm.markAllAsTouched(),this.umtauschForm.updateValueAndValidity(),this.angemessenheitsPruefungForm.updateValueAndValidity();return}let n=this.umtauschForm.controls;this.model.betrag=n.umtauschBetrag.value,this.model.ausfuehrungsDatum=n.ausfuehrungstag.value,this.model.isKomplettumtausch=n.performKomplettumtausch?.value,this.model.uebersteuereZielmarktkonflikt=!!this.angemessenheitsPruefungForm?.controls.conflicts?.valid,this.execute()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setupZielmarktKonflikt$(){let n=this.model.strategy.targetFonds(this.model).isin;this.zielmarktkonflikte$=this.umtauschViewModel.zielmarktkonflikte$(n).pipe(Re(this.destroy$),N(i=>{i?.length>0&&(this.angemessenheitsPruefungForm=new Le({conflicts:$n(i)}))}))}createForwardPricingNotifications(){let n=this.model.sourceUnterdepot,i=this.model.strategy.targetFonds(this.model);this.fondsHasForwardPricing(n)&&this.notifications.push({textKey:"FORWARD_PRICING_NOTIFICATION_QUELLFONDS",textParameters:{priceDatePlus:n?.priceDatePlus,fondsName:n?.name}}),this.fondsHasForwardPricing(i)&&this.notifications.push({textKey:"FORWARD_PRICING_NOTIFICATION_ZIELFONDS",textParameters:{priceDatePlus:i?.priceDatePlus,fondsName:i?.name}})}fondsHasForwardPricing(n){return!!n?.priceDatePlus&&n.priceDatePlus>0}execute(){this.erstellungPending=!0,this.umtauschViewModel.fromUmtauschModel(this.model).execute().pipe(xt(()=>this.erstellungPending=!1)).subscribe({error:i=>{i.type===Me.TECHNICAL_ERROR&&(this.umtauschForm.disable(),this.angemessenheitsPruefungForm?.disable(),this.overlayService.showGeneralErrorModal())},next:i=>{if(Ja(i)&&this.umtauschViewModel.isUmtauschAlsVerkaufKaufPossible()){this.model.umtauschArt=lt.VERKAUF_KAUF;return}i?.displayMsg?(this.validationErrorMessage=i.displayMsg,this.scrollMessageIntoView(this.ERROR_NOTIFICTION_ELEMENT_ID)):i?.orderCoordinates&&this.transaktionenRoutingService.redirectNavigation(i.orderCoordinates.redirectUrl)}})}scrollMessageIntoView(n){setTimeout(()=>{document.getElementById(n)?.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})},100)}};t.\u0275fac=function(i){return new(i||t)(x(at),x(Qa),x(Ya),x(on))},t.\u0275cmp=P({type:t,selectors:[["app-select-amount-step-container"]],standalone:!0,features:[W,G],decls:97,vars:110,consts:[[3,"title","subheader"],[3,"formGroup"],[1,"form-container"],["data-test-id","umtausch-betrag",1,"grid-betrag",3,"label","formControl","type","placeholder"],["vhSuffix",""],["controlName","umtauschBetrag"],[1,"grid-komplettumtausch"],["data-test-id","umtausch-komplettverkauf",3,"formControl"],["vhButton","","variant","borderless",1,"negative-y-margin",3,"click"],["name","infozeichen-mit-kreis",3,"size"],["class","grid-date",4,"ngIf"],[1,"fonds-preview","grid-bestandsfonds"],[1,"vh-font-style-8","mrg-b-2-bd"],[1,"vh-font-style-6","mrg-b-1-bd"],[1,"fonds-information","mrg-b-4-bd"],[1,"vh-font-style-8"],["data-test-id","umtausch-sourcefonds-future-asset-value",3,"label"],["data-test-id","umtausch-sourcefonds-current-asset-value",3,"label"],["name","vh-ic_transaktion-umbuchung_24",1,"grid-icon"],[1,"fonds-preview","grid-neufonds"],["class","vh-font-style-8",4,"ngIf"],["data-test-id","umtausch-zielfonds-future-asset-value",1,"highlighted-amount",3,"label"],["data-test-id","umtausch-zielfonds-current-asset-value",3,"label",4,"ngIf"],[1,"notification-lane"],["type","warning",4,"ngFor","ngForOf"],[4,"ngIf"],["type","error",4,"ngIf"],["type","warning","id","wizard-fonds-umtausch-unmoeglich-verkauf-kauf-message",4,"ngIf"],[3,"abortButton","specialButton","nextButton","disabled","pending","buttonConfigs"],[1,"vh-font-style-6",3,"vhId"],["vhModalHeader","",1,"vh-font-style-1"],["vhModalSubheader",""],[1,"list-with-hooks"],["vhButton","","data-test-id","umtausch-komplettverkauf-modal-close","variant","secondary",3,"click"],[1,"grid-date"],[3,"nextPossibleDateLabel","datePickerTestId","datePickerControl","datePickerConfig","datePickerLabelKey"],["data-test-id","umtausch-zielfonds-current-asset-value",3,"label"],["type","warning"],[3,"fundTargetMarketConflicts","angemessenheitPruefungFormGroup"],["type","error"],["type","warning","id","wizard-fonds-umtausch-unmoeglich-verkauf-kauf-message"]],template:function(i,o){i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),d(2,"translate"),l(3,"or-ui-transaktion-card")(4,"div",1)(5,"div",2)(6,"vh-input",3),d(7,"productTranslate"),d(8,"async"),d(9,"translate"),l(10,"span",4),_(11,"\u20AC"),c(),l(12,"vh-error"),U(13,"or-ui-form-control-error",5),c()(),l(14,"div",6)(15,"vh-checkbox",7),_(16),d(17,"translate"),l(18,"button",8),b("click",function(){return o.modalService.open(o.KOMPLETTVERKAUF_MODAL_ID)}),U(19,"vh-icon",9),c()()(),y(20,Bc,3,7,"div",10),l(21,"div",11)(22,"div",12),_(23),d(24,"translate"),c(),l(25,"div",13),_(26),c(),l(27,"div",14)(28,"span",15),_(29),d(30,"translate"),c(),l(31,"span",15),_(32),d(33,"translate"),c()(),l(34,"vh-labeled-content",16),d(35,"translate"),_(36),d(37,"number"),c(),l(38,"vh-labeled-content",17),d(39,"translate"),_(40),d(41,"number"),c()(),U(42,"vh-icon",18),l(43,"div",19)(44,"div",12),_(45),d(46,"translate"),c(),l(47,"div",13),_(48),c(),l(49,"div",14)(50,"span",15),_(51),d(52,"translate"),c(),y(53,zc,3,4,"span",20),c(),l(54,"vh-labeled-content",21),d(55,"translate"),_(56),d(57,"number"),c(),y(58,Hc,4,7,"vh-labeled-content",22),c()(),l(59,"div",23),y(60,Gc,3,4,"vh-notification",24)(61,$c,3,4,"div",25),d(62,"async"),y(63,Kc,2,2,"vh-notification",26)(64,jc,3,3,"vh-notification",27),c()()(),l(65,"or-ui-transaktion-button-group",28),b("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("specialButton",function(){return o.onBack()})("nextButton",function(){return o.onForward()}),c()(),l(66,"vh-modal",29)(67,"h1",30),_(68),d(69,"translate"),c(),l(70,"div",31),_(71),d(72,"translate"),c(),l(73,"ul",32)(74,"li"),_(75),d(76,"translate"),c(),l(77,"li"),_(78),d(79,"translate"),c(),l(80,"li"),_(81),d(82,"translate"),c(),l(83,"li"),_(84),d(85,"translate"),c(),l(86,"li"),_(87),d(88,"translate"),c(),y(89,Zc,3,3,"li",25),c(),l(90,"span"),_(91),d(92,"translate"),c(),l(93,"vh-modal-footer")(94,"button",33),b("click",function(){return o.modalService.close(o.KOMPLETTVERKAUF_MODAL_ID)}),_(95),d(96,"translate"),c()()()),i&2&&(p("title",f(1,47,o.headerLabel))("subheader",f(2,49,"UMTAUSCH_BETRAG_SCHRITT_SUBHEADER")),a(4),p("formGroup",o.umtauschForm),a(2),p("label",f(8,53,f(7,51,"EXCHANGE_SELECT_AMOUNT_STEP_CONTAINER__INPUT_TITLE")))("formControl",o.umtauschForm.controls.umtauschBetrag)("type",o.allowDecimals?"currency_decimal":"currency")("placeholder",De(9,55,"UMTAUSCH_MIN_AMOUNT",he(106,Uc,o.mindestBetrag))),a(9),p("formControl",o.umtauschForm.controls.performKomplettumtausch),a(),M(" ",f(17,58,"EXCHANGE_SELECT_AMOUNT_STEP_CONTAINER__CHECKBOX_LABEL")," "),a(3),p("size",24),a(),p("ngIf",o.isTerminierterUmtauschPossible),a(3),A(f(24,60,"EXCHANGE_INITIAL_FONDS")),a(3),A(o.model.sourceUnterdepot.name),a(3),$e("",f(30,62,"EXCHANGE_PORTFOLIO_HEADER_ISIN")," ",o.model.sourceUnterdepot.isin,""),a(3),$e("",f(33,64,"EXCHANGE_PORTFOLIO_HEADER_UNTERDEPOT_NR")," ",o.model.sourceUnterdepot.unterdepotIndex,""),a(2),p("label",f(35,66,"EXCHANGE_INITIAL_FONDS_FUTURE_VALUE__TITLE")),a(2),M(" ",o.umtauschForm.controls.umtauschBetrag.value?De(37,68,o.getNewAnlagezielValue(),"1.2-2")+" \u20AC":"-"," "),a(2),p("label",f(39,71,"EXCHANGE_INITIAL_FONDS_CURRENT_VALUE__TITLE")),a(2),M(" ",De(41,73,o.model.sourceUnterdepot.aktuellerWert,"1.2-2")," \u20AC "),a(5),A(f(46,76,"EXCHANGE_NEW_FONDS")),a(3),A(o.getTargetFonds().name),a(3),$e("",f(52,78,"EXCHANGE_PORTFOLIO_HEADER_ISIN")," ",o.getTargetFonds().isin,""),a(2),p("ngIf",o.model.unterdepotIndexToTradeIn),a(),p("label",f(55,80,"EXCHANGE_INITIAL_FONDS_FUTURE_VALUE__TITLE")),a(2),M(" ",o.umtauschForm.controls.umtauschBetrag.value?De(57,82,o.getTargetAnlagezielFutureValue(),"1.2-2")+" \u20AC":"-"," "),a(2),p("ngIf",!o.model.fondsToTradeIn),a(2),p("ngForOf",o.notifications),a(),p("ngIf",!!f(62,85,o.zielmarktkonflikte$)),a(2),p("ngIf",!!o.validationErrorMessage),a(),p("ngIf",!o.isKlassischerUmtausch),a(),p("disabled",o.umtauschForm.disabled)("pending",o.erstellungPending)("buttonConfigs",o.buttonConfigs()),a(),p("vhId",o.KOMPLETTVERKAUF_MODAL_ID),a(2),M(" ",f(69,87,o.isKlassischerUmtausch?"KOMPLETTUMTAUSCH_UMTAUSCH_TITLE":"KOMPLETTUMTAUSCH_VERKAUF_KAUF_TITLE")," "),a(3),M("",f(72,89,o.isKlassischerUmtausch?"KOMPLETTUMTAUSCH_UMTAUSCH_STEPS_INTRO":"KOMPLETTUMTAUSCH_VERKAUF_KAUF_STEPS_INTRO")," "),a(4),M("",De(76,91,o.isKlassischerUmtausch?"KOMPLETTUMTAUSCH_UMTAUSCH_STEP1":"KOMPLETTUMTAUSCH_VERKAUF_KAUF_STEP1",he(108,Vc,o.getTargetFonds().name))," "),a(3),A(f(79,94,"KOMPLETTUMTAUSCH_STEP2")),a(3),A(f(82,96,"KOMPLETTUMTAUSCH_STEP3")),a(3),A(f(85,98,"KOMPLETTUMTAUSCH_STEP4")),a(3),A(f(88,100,"KOMPLETTUMTAUSCH_STEP5")),a(2),p("ngIf",o.isKlassischerUmtausch),a(2),A(f(92,102,o.isKlassischerUmtausch?"KOMPLETTUMTAUSCH_UMTAUSCH_INFO_TEXT":"KOMPLETTUMTAUSCH_VERKAUF_KAUF_INFO_TEXT")),a(4),M("",f(96,104,"KOMPLETTUMTAUSCH_MODAL_CLOSE")," "))},dependencies:[q,Yt,X,Z,Ve,Pt,ko,Ne,Oe,Lo,Io,To,ni,ti,ei,Do,ri,ii,li,ai,si,ot,it,rt,qn,Yn,Gn,ne,Be,Vt,oi,tn,te,ee],styles:['.hide[_ngcontent-%COMP%]{display:none}.icon-attention-red[_ngcontent-%COMP%]{color:var(--color-group-35);font-size:20px}.form-control-error[_ngcontent-%COMP%]   i.icon.icon-attention-red[_ngcontent-%COMP%]{color:unset}.text-align-right[_ngcontent-%COMP%]{text-align:right}.text-align-center[_ngcontent-%COMP%]{text-align:center}.flow-text[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.headline[_ngcontent-%COMP%]{text-align:center}.h1-order[_ngcontent-%COMP%], .h2[_ngcontent-%COMP%], .h3[_ngcontent-%COMP%], .h4[_ngcontent-%COMP%]{margin-bottom:20px;font-weight:700}.h1-order[_ngcontent-%COMP%]{color:var(--color-group-1);font-family:var(--vh-font-family-1);font-weight:var(--vh-font-weight-1);text-transform:var(--vh-text-transform-1);font-size:var(--vh-font-size-1);line-height:var(--vh-line-height-1)}@media (min-width: 1440px){.h1-order[_ngcontent-%COMP%]{font-size:48px}}.h2-order-details-headline[_ngcontent-%COMP%]{color:var(--color-group-69);font-family:var(--vh-font-family-2);font-weight:var(--vh-font-weight-2);text-transform:var(--vh-text-transform-2);font-size:var(--vh-font-size-2);line-height:var(--vh-line-height-2)}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:20px}.margin-complete-component[_ngcontent-%COMP%]{margin:40px 0}.radio-seperator[_ngcontent-%COMP%]{margin:0 10px;color:var(--color-group-69);font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.document-downloaded[_ngcontent-%COMP%]{color:var(--color-group-33)}@media screen and (width <= 767px){.button[_ngcontent-%COMP%]{margin-left:0;margin-right:0}}.mrg-b-1-bd[_ngcontent-%COMP%]{margin-bottom:4px}.mrg-b-2-bd[_ngcontent-%COMP%]{margin-bottom:8px}.mrg-b-4-bd[_ngcontent-%COMP%]{margin-bottom:16px}.mrg-b-6-bd[_ngcontent-%COMP%]{margin-bottom:24px}.mrg-b-8-bd[_ngcontent-%COMP%]{margin-bottom:32px}.mrg-b-10-bd[_ngcontent-%COMP%]{margin-bottom:40px}.mrg-t-3-bd[_ngcontent-%COMP%]{margin-top:16px}.mrg-t-6-bd[_ngcontent-%COMP%]{margin-top:24px}.mrg-t-7-bd[_ngcontent-%COMP%]{margin-top:28px}.mrg-t-8-bd[_ngcontent-%COMP%]{margin-top:32px}.mrg-t-12-bd[_ngcontent-%COMP%]{margin-top:48px}.details-margin-top[_ngcontent-%COMP%]{margin-top:40px}.confirmation-subline[_ngcontent-%COMP%]{font-size:16px}.subline[_ngcontent-%COMP%]{text-align:center;font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.container-fluid[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px;max-width:1260px;margin-left:auto;margin-right:auto}@media (width >= 768px){.container-fluid[_ngcontent-%COMP%]{padding-left:30px;padding-right:30px}}main[_ngcontent-%COMP%]{min-height:calc(100vh - 200px)}.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:8px}@media (min-width: 768px){.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:16px}}.margin-labeled-content[_ngcontent-%COMP%]:last-child{margin-bottom:0}.mt-between-boxes[_ngcontent-%COMP%]{margin-top:24px}@media (width >= 768px){.mt-between-boxes[_ngcontent-%COMP%]{margin-top:30px}}.button-group[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}@media (width <= 576px){.button-group[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.form-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:"betrag . date" "komplettumtausch komplettumtausch ." "bestandsfonds icon neufonds";gap:8px 2px;justify-items:stretch}@media (width < 576px){.form-container[_ngcontent-%COMP%]{display:flex;gap:8px;flex-direction:column}}.highlighted-amount[_ngcontent-%COMP%]{padding:0 8px;border-radius:4px;background-color:var(--color-group-1104)}.grid-icon[_ngcontent-%COMP%]{align-self:center;color:var(--color-group-1101);grid-area:icon}@media (width < 576px){.grid-icon[_ngcontent-%COMP%]{rotate:90deg}}.grid-betrag[_ngcontent-%COMP%]{grid-area:betrag}.grid-date[_ngcontent-%COMP%]{grid-area:date}.grid-komplettumtausch[_ngcontent-%COMP%]{grid-area:komplettumtausch}.grid-bestandsfonds[_ngcontent-%COMP%]{grid-area:bestandsfonds}.grid-neufonds[_ngcontent-%COMP%]{grid-area:neufonds}.fonds-preview[_ngcontent-%COMP%]{border:2px solid var(--color-group-1103);border-radius:10px;padding:16px;display:flex;flex-direction:column}@media (width >= 576px){.fonds-preview[_ngcontent-%COMP%]{margin-top:12px}}.fonds-preview[_ngcontent-%COMP%]   .fonds-information[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-of-type{margin-right:16px}.notification-lane[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{margin-top:24px}.list-with-hooks[_ngcontent-%COMP%]{width:100%;margin-bottom:40px}.list-with-hooks[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{list-style-type:none}.list-with-hooks[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before{position:relative;top:4px;margin-left:-45px;margin-right:6px;display:inline-block;width:1.3em;content:"\\e908";font-size:30px;font-family:iconfont,serif}.negative-y-margin[_ngcontent-%COMP%]{margin-top:-50.25%;margin-bottom:-49.75%;margin-left:-10px}']});let e=t;return e})();function ts(){let e=Se(Ke);window.location.href=`${window.location.protocol}//${window.location.host}/dashboard/anlageziele/${e.getDepotIndex()}/${e.getAnlagezielId()}`}function ns(){let e=Se(Ke);window.location.href=`${window.location.protocol}//${window.location.host}/dashboard/anlageziele/${e.getDepotIndex()}`}function Wr(e){return{label:"TRANSACTIONS_PATH_RESOLVER_LABEL",pageLabel:"TRANSACTIONS_PATH_RESOLVER_PAGE_LABEL",url:`/dashboard/transactions/depot/${e.params[Ae.DEPOT_IDX]}`}}function is(e){let t=e.params[Ae.DEPOT_IDX],r=Se($);return r.dispatch(new It(t)).pipe(de(()=>r.select(Ce.getProductType)),oe(1),de(n=>r.dispatch(new Vn(n))))}function rs(){let e=Se(Ke);try{if(e.getDepotIndex().length<=0)return Ki()}catch{return Ki()}return!0}function os(){let e=Se(Ke);try{if(e.getAnlagezielId()<0)return Ki()}catch{return Ki()}return!0}function Ki(){return Se(be).navigateByUrl(Xr),!1}function as(){let e=Se(be);return Se(Fo).isRegisteredUser().pipe(v(r=>r?!0:(e.navigate(["not-authorized"],{queryParams:{missingRole:!0}}),!1)))}function ss(e){let t=e.params[Ae.DEPOT_IDX],r=e.params[Ae.ANLAGEZIEL_ID];return Se($).dispatch(new Dn(Number(t),r))}var ls=(()=>{let t=class t extends ie{constructor(){super(...arguments),this.buttonConfigs={nextButton:{dataTestId:"neukauf-weiter"},abortButton:{dataTestId:"neukauf-abbrechen"}},this.CLOSE_REASON=K,this.NeukaufSteps=Ye}};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ft(t)))(o||t)}})(),t.\u0275cmp=P({type:t,selectors:[["app-fondssuche-step-container"]],standalone:!0,features:[W,G],decls:5,vars:4,consts:[[3,"title"],["title","Dummy Fondssuche"],[3,"abortButton","nextButton","buttonConfigs"]],template:function(i,o){i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),l(2,"or-ui-transaktion-card",1),_(3," lol "),c(),l(4,"or-ui-transaktion-button-group",2),b("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("nextButton",function(){return o.navigateTo.emit(o.NeukaufSteps.EINMALIGE_ANLAGE_ODER_SPARPLAN)}),c()()),i&2&&(p("title",f(1,2,"NEUKAUF_TITEL")),a(4),p("buttonConfigs",o.buttonConfigs))},dependencies:[te,X,Z,ne,ee],encapsulation:2});let e=t;return e})();var cs=(()=>{let t=class t extends ie{constructor(){super(...arguments),this.buttonConfigs={nextButton:{dataTestId:"neukauf-einmalige-anlage-weiter"},specialButton:{dataTestId:"neukauf-einmalige-anlage-zurueck",textLabel:"ANLAGEZIEL-TRANSAKTION--BACK"},abortButton:{dataTestId:"neukauf-einmalige-anlage-abbrechen"}},this.CLOSE_REASON=K,this.NeukaufSteps=Ye}};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ft(t)))(o||t)}})(),t.\u0275cmp=P({type:t,selectors:[["app-einmalige-anlage-step-container"]],standalone:!0,features:[W,G],decls:4,vars:4,consts:[[3,"title"],["title","Dummy Einmalige Anlage"],[3,"abortButton","specialButton","buttonConfigs"]],template:function(i,o){i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),U(2,"or-ui-transaktion-card",1),l(3,"or-ui-transaktion-button-group",2),b("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("specialButton",function(){return o.navigateTo.emit(o.NeukaufSteps.EINMALIGE_ANLAGE_ODER_SPARPLAN)}),c()()),i&2&&(p("title",f(1,2,"NEUKAUF_TITEL")),a(3),p("buttonConfigs",o.buttonConfigs))},dependencies:[te,X,Z,ne,ee],encapsulation:2});let e=t;return e})();var ps=(()=>{let t=class t extends ie{constructor(){super(...arguments),this.buttonConfigs={abortButton:{dataTestId:"neukauf-sparplan-erstellen-abbrechen"},specialButton:{dataTestId:"neukauf-sparplan-erstellen-zurueck",textLabel:"ANLAGEZIEL-TRANSAKTION--BACK"},nextButton:{dataTestId:"neukauf-sparplan-erstellen-weiter"}},this.CLOSE_REASON=K,this.NeukaufSteps=Ye}};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ft(t)))(o||t)}})(),t.\u0275cmp=P({type:t,selectors:[["app-sparplan-erstellen-step-container"]],standalone:!0,features:[W,G],decls:4,vars:4,consts:[[3,"title"],["title","Dummy Regelm\xE4\xDFiger Sparplan"],[3,"abortButton","specialButton","buttonConfigs"]],template:function(i,o){i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),U(2,"or-ui-transaktion-card",1),l(3,"or-ui-transaktion-button-group",2),b("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("specialButton",function(){return o.navigateTo.emit(o.NeukaufSteps.EINMALIGE_ANLAGE_ODER_SPARPLAN)}),c()()),i&2&&(p("title",f(1,2,"NEUKAUF_TITEL")),a(3),p("buttonConfigs",o.buttonConfigs))},dependencies:[te,X,Z,ne,ee],encapsulation:2});let e=t;return e})();function Xc(e,t){e&1&&(l(0,"vh-notification",7),_(1),d(2,"translate"),c()),e&2&&(a(),M("",f(2,1,"SELECT_EINMALIGE_ANLAGE_ODER_SPARPLAN__NO_SELECTION")," "))}var us=(()=>{let t=class t extends ie{constructor(){super(...arguments),this.buttonConfigs={abortButton:{dataTestId:"neukauf-einmalanlage-oder-sparplan-abbrechen"},specialButton:{dataTestId:"neukauf-einmalanlage-oder-sparplan-zurueck",textLabel:"ANLAGEZIEL-TRANSAKTION--BACK"},nextButton:{dataTestId:"neukauf-einmalanlage-oder-sparplan-weiter"}},this.currentSelection=null,this.showNoSelectionOverlay=!1,this.CLOSE_REASON=K,this.NeukaufSteps=Ye}onContinue(){if(!this.currentSelection){this.showNoSelectionOverlay=!0;return}this.navigateTo.emit(this.currentSelection)}};t.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ft(t)))(o||t)}})(),t.\u0275cmp=P({type:t,selectors:[["app-neukauf-einmalanlage-oder-sparplan-step-container"]],standalone:!0,features:[W,G],decls:18,vars:20,consts:[[3,"title"],["title","(Dummy) Einmalanlage oder Sparplan"],["class","mrg-b-4-bd","type","error","data-test-id","select_einmalige_anlage_order_sparplan_notification",4,"ngIf"],["mode","single","required","","data-test-id","select-neukauf-card-group",1,"neukauf-einmalanlage-oder-sparplan-grid",3,"ngModelChange","ngModel"],[3,"value"],["vhSelectableCardHeader",""],[3,"nextButton","abortButton","specialButton","buttonConfigs"],["type","error","data-test-id","select_einmalige_anlage_order_sparplan_notification",1,"mrg-b-4-bd"]],template:function(i,o){i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),l(2,"or-ui-transaktion-card",1),y(3,Xc,3,3,"vh-notification",2),l(4,"vh-selectable-card-group",3),St("ngModelChange",function(m){return vt(o.currentSelection,m)||(o.currentSelection=m),m}),l(5,"vh-selectable-card",4)(6,"h3",5),_(7),d(8,"translate"),c(),_(9),d(10,"translate"),c(),l(11,"vh-selectable-card",4)(12,"h3",5),_(13),d(14,"translate"),c(),_(15),d(16,"translate"),c()()(),l(17,"or-ui-transaktion-button-group",6),b("nextButton",function(){return o.onContinue()})("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("specialButton",function(){return o.navigateTo.emit(o.NeukaufSteps.FONDSSUCHE)}),c()()),i&2&&(p("title",f(1,10,"NEUKAUF_TITEL")),a(3),p("ngIf",o.showNoSelectionOverlay),a(),Et("ngModel",o.currentSelection),a(),p("value",o.NeukaufSteps.EINMALIGE_ANLAGE),a(2),A(f(8,12,"SELECT_EINMALIGE_ANLAGE_TITLE")),a(2),M(" ",f(10,14,"SELECT_EINMALIGE_ANLAGE_DESCRIPTION")," "),a(2),p("value",o.NeukaufSteps.SPARPLAN_ERSTELLEN),a(2),A(f(14,16,"SELECT_SPARPLAN_TITLE")),a(2),M(" ",f(16,18,"SELECT_SPARPLAN_DESCRIPTION")," "),a(2),p("buttonConfigs",o.buttonConfigs))},dependencies:[te,X,Z,ne,Be,en,it,Qt,Jt,rn,nn,q,Ne,Oe,ee],styles:[".hide[_ngcontent-%COMP%]{display:none}.icon-attention-red[_ngcontent-%COMP%]{color:var(--color-group-35);font-size:20px}.form-control-error[_ngcontent-%COMP%]   i.icon.icon-attention-red[_ngcontent-%COMP%]{color:unset}.text-align-right[_ngcontent-%COMP%]{text-align:right}.text-align-center[_ngcontent-%COMP%]{text-align:center}.flow-text[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.headline[_ngcontent-%COMP%]{text-align:center}.h1-order[_ngcontent-%COMP%], .h2[_ngcontent-%COMP%], .h3[_ngcontent-%COMP%], .h4[_ngcontent-%COMP%]{margin-bottom:20px;font-weight:700}.h1-order[_ngcontent-%COMP%]{color:var(--color-group-1);font-family:var(--vh-font-family-1);font-weight:var(--vh-font-weight-1);text-transform:var(--vh-text-transform-1);font-size:var(--vh-font-size-1);line-height:var(--vh-line-height-1)}@media (min-width: 1440px){.h1-order[_ngcontent-%COMP%]{font-size:48px}}.h2-order-details-headline[_ngcontent-%COMP%]{color:var(--color-group-69);font-family:var(--vh-font-family-2);font-weight:var(--vh-font-weight-2);text-transform:var(--vh-text-transform-2);font-size:var(--vh-font-size-2);line-height:var(--vh-line-height-2)}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:20px}.margin-complete-component[_ngcontent-%COMP%]{margin:40px 0}.radio-seperator[_ngcontent-%COMP%]{margin:0 10px;color:var(--color-group-69);font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.document-downloaded[_ngcontent-%COMP%]{color:var(--color-group-33)}@media screen and (width <= 767px){.button[_ngcontent-%COMP%]{margin-left:0;margin-right:0}}.mrg-b-1-bd[_ngcontent-%COMP%]{margin-bottom:4px}.mrg-b-2-bd[_ngcontent-%COMP%]{margin-bottom:8px}.mrg-b-4-bd[_ngcontent-%COMP%]{margin-bottom:16px}.mrg-b-6-bd[_ngcontent-%COMP%]{margin-bottom:24px}.mrg-b-8-bd[_ngcontent-%COMP%]{margin-bottom:32px}.mrg-b-10-bd[_ngcontent-%COMP%]{margin-bottom:40px}.mrg-t-3-bd[_ngcontent-%COMP%]{margin-top:16px}.mrg-t-6-bd[_ngcontent-%COMP%]{margin-top:24px}.mrg-t-7-bd[_ngcontent-%COMP%]{margin-top:28px}.mrg-t-8-bd[_ngcontent-%COMP%]{margin-top:32px}.mrg-t-12-bd[_ngcontent-%COMP%]{margin-top:48px}.details-margin-top[_ngcontent-%COMP%]{margin-top:40px}.confirmation-subline[_ngcontent-%COMP%]{font-size:16px}.subline[_ngcontent-%COMP%]{text-align:center;font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.container-fluid[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px;max-width:1260px;margin-left:auto;margin-right:auto}@media (width >= 768px){.container-fluid[_ngcontent-%COMP%]{padding-left:30px;padding-right:30px}}main[_ngcontent-%COMP%]{min-height:calc(100vh - 200px)}.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:8px}@media (min-width: 768px){.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:16px}}.margin-labeled-content[_ngcontent-%COMP%]:last-child{margin-bottom:0}.mt-between-boxes[_ngcontent-%COMP%]{margin-top:24px}@media (width >= 768px){.mt-between-boxes[_ngcontent-%COMP%]{margin-top:30px}}.button-group[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}@media (width <= 576px){.button-group[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.neukauf-einmalanlage-oder-sparplan-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media (width < 768px){.neukauf-einmalanlage-oder-sparplan-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]});let e=t;return e})();function qc(e,t){if(e&1){let r=Y();l(0,"app-fondssuche-step-container",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",r.model)}}function Yc(e,t){if(e&1){let r=Y();l(0,"app-neukauf-einmalanlage-oder-sparplan-step-container",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",r.model)}}function Jc(e,t){if(e&1){let r=Y();l(0,"app-einmalige-anlage-step-container",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",r.model)}}function Qc(e,t){if(e&1){let r=Y();l(0,"app-sparplan-erstellen-step-container",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",r.model)}}var ds=(()=>{let t=class t extends sn{constructor(n){super(),this.router=n,this.NeukaufSteps=Ye,this.currentStep=Ye.FONDSSUCHE}ngOnInit(){this.model={}}closeWizard(n){switch(n){case K.CANCELLED:this.router.navigate([jt,Mt.DEPOT_UEBERSICHT]).then();break;default:st()}}};t.\u0275fac=function(i){return new(i||t)(x(be))},t.\u0275cmp=P({type:t,selectors:[["app-neukauf"]],standalone:!0,features:[W,G],decls:5,vars:4,consts:[[3,"submit"],[3,"model","navigateTo","closeEvent",4,"ngIf"],[3,"navigateTo","closeEvent","model"]],template:function(i,o){i&1&&(l(0,"form",0),b("submit",function(m){return m.preventDefault()}),y(1,qc,1,1,"app-fondssuche-step-container",1)(2,Yc,1,1,"app-neukauf-einmalanlage-oder-sparplan-step-container",1)(3,Jc,1,1,"app-einmalige-anlage-step-container",1)(4,Qc,1,1,"app-sparplan-erstellen-step-container",1),c()),i&2&&(a(),p("ngIf",o.currentStep===o.NeukaufSteps.FONDSSUCHE),a(),p("ngIf",o.currentStep===o.NeukaufSteps.EINMALIGE_ANLAGE_ODER_SPARPLAN),a(),p("ngIf",o.currentStep===o.NeukaufSteps.EINMALIGE_ANLAGE),a(),p("ngIf",o.currentStep===o.NeukaufSteps.SPARPLAN_ERSTELLEN))},dependencies:[ls,q,ot,Rt,rt,us,cs,ps],encapsulation:2});let e=t;return e})(),Ye=function(e){return e.FONDSSUCHE="FONDSSUCHE",e.EINMALIGE_ANLAGE_ODER_SPARPLAN="EINMALIGE_ANLAGE_ODER_SPARPLAN",e.EINMALIGE_ANLAGE="EINMALIGE_ANLAGE",e.SPARPLAN_ERSTELLEN="SPARPLAN_ERSTELLEN",e}(Ye||{});var gt=function(e){return e.MONATLICH="MONTHLY",e.ZWEIMONATLICH="TWOMONTHLY",e.VIERTELJAEHRLICH="QUARTERLY",e.HALBJAEHRLICH="HALFYEARLY",e.JAEHRLICH="YEARLY",e}(gt||{});function a0(e){return e||gt.MONATLICH}var ji=class extends Le{constructor(){super({betrag:new Ie(null),zahlungsrhytmus:new Ie(gt.MONATLICH),ausfuehrungsDatum:new Ie,uebermittlungElektronischerVermoegensbescheinigung:new Ie(!1)}),this.controls.zahlungsrhytmus.valueChanges.subscribe(()=>{this.controls.betrag.updateValueAndValidity()})}getValues(){return{isin:this.isin,intervall:this.controls.zahlungsrhytmus.value,rate:this.controls.betrag.value,initialesAusfuehrungsdatum:ho(this.controls.ausfuehrungsDatum.value??this.ausfuehrungsDatumConfig.validMinDate,"yyyy-MM-dd","de-DE"),elektronischeUebermittlung:this.controls.uebermittlungElektronischerVermoegensbescheinigung.value}}};var ms=(()=>{let t=class t{constructor(n){this.http=n,this.order=null}loadOrder$(n,i,o=!1){return i===this.txId?F(void 0):this.loadSummaryFromOrderFs(n,i,o).pipe(N(s=>{this.txId=i,this.order=s}),v(()=>{}))}getOrder(n){return n===this.txId?this.order:null}loadSummaryFromOrderFs(n,i,o){return o?this.http.get(`/order-functional-service/depot/${n}/auftrag/${i}/zusammenfassung`):this.http.get(`/order-functional-service/depot/${n}/order/${i}/summary`)}};t.\u0275fac=function(i){return new(i||t)(h(ae))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function gs(e,t){return r=>t instanceof j?t.pipe(v(n=>fs(r,e,n))):fs(r,e,t)}function fs(e,t,r){return String(e.value)===String(r)?null:{exact:{translationKey:t}}}var hs=(...e)=>t=>{let r=e.map(i=>i(t)),n=r.filter(i=>i!=null);return r.includes(null)?null:n?.[n.length-1]??null};var _s=e=>{let t=o=>e.formatNumber?new Yt(e.locale??"de-DE").transform(o):`${o}`,r=e.minTranslationKey||"ANLAGEZIEL_NUMBER_INPUT__VALIDATOR-MIN-EUR",n=e.maxTranslationKey||"ANLAGEZIEL_NUMBER_INPUT__VALIDATOR-MAX-EUR",i=kn({translationKey:r,min:e.min,formattingFn:t,tooltipType:Fe.ERROR,notDirtyIsValid:!1,minPerYear:e.minPerYear});return[e.allowZero?hs(gs(null,0),i):i,Un(n,e.max,t,Fe.ERROR)]};var Es=(e,t,r)=>n=>{let i=Ss(t?.value);return i*n.value>=e?null:{betrag:{translationKey:r,translationVariables:{min:e,minBetragPerRhythmus:e/i}}}},vs=(e,t,r)=>n=>Ss(t.value)*n.value<=e?null:{betrag:{translationKey:r,translationVariables:{max:e}}},Ss=e=>{switch(e){case gt.MONATLICH:return 12;case gt.ZWEIMONATLICH:return 6;case gt.VIERTELJAEHRLICH:return 4;case gt.HALBJAEHRLICH:return 2;case gt.JAEHRLICH:return 1;default:throw Error("invalider Ratenplanzyklus")}};var Cs=(()=>{let t=class t{constructor(n,i,o,s){this.store=n,this.orderService=i,this.orderSummaryCachedClient=o,this.dateSelectionConfigFactory=s}get vlNeukaufForm(){return this.form}load$(n,i,o){return this.form?.reset(),o?this.orderSummaryCachedClient.loadOrder$(n,o,!0).pipe(N(()=>this.buildForm(i,o)),v(()=>{})):(this.buildForm(i),F(void 0))}loadForFondssuche$(n){return this.store.dispatch(new It(n.toString()))}getTransaktion(n=void 0){return{execute:()=>this.orderService.validateVlBuy$(Qe(ge({},this.form.getValues()),{overwriteExperienceCheck:n})).pipe(v(i=>({displayMsg:i.invalidMessage,orderCoordinates:i.transactionCoordinates,invalidateCaches:()=>this.orderService.invalidateCache(i.transactionCoordinates)})))}}buildForm(n,i){this.form=new ji,this.addAdditionalConfig(n),this.addValidators(),this.prefillForm(i)}getProductConfiguration(){return this.store.selectSnapshot(n=>n[Bn])}getLimitMaxProJahr(){return this.store.selectSnapshot(wt.getConfigValue(n=>n.vlNeukaufBetragMaxProJahr))}getLimitMinProJahr(){return this.store.selectSnapshot(wt.getConfigValue(n=>n.vlNeukaufBetragMinProJahr))}getLimitMinProMonth(){return this.getLimitMinProJahr()?Math.round(this.getLimitMinProJahr()/12):1}addAdditionalConfig(n){this.form.ausfuehrungsDatumConfig=this.dateSelectionConfigFactory.vlNeukaufConfig(),this.form.isin=n,this.form.mindestBetrag=this.getLimitMinProJahr(),this.form.maximalBetrag=this.getLimitMaxProJahr()}addValidators(){let n=this.getProductConfiguration(),i=this.getLimitMaxProJahr();this.form.controls.betrag.addValidators(vs(i,this.form.controls.zahlungsrhytmus,"VL_NEUKAUF.BETRAG_VALIDATION_MAX"));let o=this.getLimitMinProJahr();o&&this.form.controls.betrag.addValidators(Es(o,this.form.controls.zahlungsrhytmus,"VL_NEUKAUF.BETRAG_VALIDATION_MIN")),this.form.controls.betrag.addValidators(Fi({min:this.getLimitMinProJahr(),formatSettings:{formatNumber:!0},minTranslationKey:"VL_NEUKAUF.BETRAG_VALIDATION_MIN"})),this.form.controls.betrag.addValidators(_s({min:this.getLimitMinProMonth(),max:n.maxMonthlyRate,allowZero:!1,formatNumber:!0,minPerYear:this.getLimitMinProJahr(),maxPerYear:this.getLimitMaxProJahr(),minTranslationKey:"VL_NEUKAUF.BETRAG_VALIDATION_MIN",maxTranslationKey:"VL_NEUKAUF.BETRAG_VALIDATION_MAX"}))}prefillForm(n){if(n){let i=this.orderSummaryCachedClient.getOrder(n);this.form.patchValue({betrag:i?.orderDetails.vlNeukauf.rate,zahlungsrhytmus:i?.orderDetails.vlNeukauf.intervall,ausfuehrungsDatum:Ia(i?.orderDetails.vlNeukauf.initialesAusfuehrungsdatum)??void 0,uebermittlungElektronischerVermoegensbescheinigung:i?.orderDetails.vlNeukauf.zustimmungElektronischeUebermittlung})}}};t.\u0275fac=function(i){return new(i||t)(h($),h(yi),h(ms),h(xi))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Zi=(()=>{let t=class t{constructor(n,i,o){this.zielmarktkonfliktFeatureModel=n,this.sharedCoreViewmodel=i,this.store=o}get vlNeukaufForm(){return this.sharedCoreViewmodel.vlNeukaufForm}zielmarktkonflikte$(n){return this.zielmarktkonfliktFeatureModel.zielmarktkonflikte$(n)}load$(n,i){return this.sharedCoreViewmodel.load$(n,i)}getTransaktion(n=void 0){return this.sharedCoreViewmodel.getTransaktion(n)}getShowAusgabeaufschlagFeatureToggle(){return ze("showAusgabeaufschlag",{default:!1,productType:this.store.selectSnapshot(Ce.getProductType)})}};t.\u0275fac=function(i){return new(i||t)(h(di),h(Cs),h($))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var np=()=>[],Is=(()=>{let t=class t extends ie{constructor(n,i,o){super(),this.vlNeukaufViewModel=n,this.depotIndexService=i,this.router=o,this.destroy$=new Te,this.showElektronischeVerarbeitungNotification=!1,this.notificationId="vermoegensbescheinigung-notification",this.displayMessage="",this.pending=!1,this.buttonConfigs={abortButton:{dataTestId:"vl-neukauf-anlageziel-editor-abbrechen"},specialButton:{dataTestId:"vl-neukauf-anlageziel-editor-zurueck",textLabel:"ANLAGEZIEL-TRANSAKTION--BACK"},nextButton:{dataTestId:"vl-neukauf-anlageziel-editor-weiter"}},this.CLOSE_REASON=K,this.VlNeukaufSteps=Zt}ngOnInit(){this.vlNeukaufViewModel.load$(Number(this.depotIndexService.getDepotIndex()),this.model.selectedFonds?.isin??"").pipe(Re(this.destroy$)).subscribe(()=>{this.setupZielmarktkonflikte(),this.setupForm()})}setupZielmarktkonflikte(){this.model.zielmarktkonflikte?.length>0&&(this.angemessenheitsPruefungForm=new Le({conflicts:$n(this.model.zielmarktkonflikte)}))}setupForm(){this.vlNeukaufForm=this.vlNeukaufViewModel.vlNeukaufForm,this.formGroup=ip(this.vlNeukaufForm,this.model.zielmarktkonflikte),this.produktinformationen=mi(Qe(ge({},this.model.selectedFonds),{istSparplanMoeglich:!1,ausgabePreisBeinhaltetAusgabeaufschlag:!1}),this.vlNeukaufViewModel.getShowAusgabeaufschlagFeatureToggle())}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}get minMaxConfig(){return{min:this.vlNeukaufForm.mindestBetrag,max:this.vlNeukaufForm.maximalBetrag}}get areZielmarktkonflikteChecked(){if(this.model.zielmarktkonflikte.length!==0)return this.angemessenheitsPruefungForm.valid}onForward(){if(this.formGroup.markAllAsTouched(),!this.formGroup.invalid){if(this.didNotConsentWithoutSeeingNotification()){this.showElektronischeVerarbeitungNotification=!0,this.scrollMessageIntoView();return}this.displayMessage="",this.pending=!0,this.vlNeukaufViewModel.getTransaktion(this.areZielmarktkonflikteChecked).execute().subscribe({next:n=>{n.orderCoordinates&&this.router.navigateByUrl(`/depot/${n.orderCoordinates.depotIdx}/auftrag/${n.orderCoordinates.txId}/vl-neukauf`),this.displayMessage=n.displayMsg??""},error:()=>(st(),F(null)),complete:()=>{this.pending=!1}})}}scrollMessageIntoView(){setTimeout(()=>{document.getElementById(this.notificationId)?.scrollIntoView()},100)}didNotConsentWithoutSeeingNotification(){return!this.formGroup.controls.uebermittlungElektronischerVermoegensbescheinigung.value&&!this.showElektronischeVerarbeitungNotification}};t.\u0275fac=function(i){return new(i||t)(x(Zi),x(Ke),x(be))},t.\u0275cmp=P({type:t,selectors:[["app-anlageziel-editor"]],standalone:!0,features:[W,G],decls:5,vars:14,consts:[[3,"title"],[3,"produktInformationen","datePickerConfig","showElektronischeVerarbeitungNotification","vlForm","zielmarktKonflikte","errorMessage","notificationTestId","minMaxConfig"],[3,"abortButton","specialButton","nextButton","buttonConfigs","pending"]],template:function(i,o){if(i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),l(2,"or-ui-transaktion-card"),U(3,"or-ui-vl-neukauf",1),c(),l(4,"or-ui-transaktion-button-group",2),b("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("specialButton",function(){return o.navigateTo.emit(o.VlNeukaufSteps.FONDSSUCHE)})("nextButton",function(){return o.onForward()}),c()()),i&2){let s;p("title",f(1,11,"VL_NEUKAUF_TITEL")),a(3),p("produktInformationen",o.produktinformationen)("datePickerConfig",o.vlNeukaufForm.ausfuehrungsDatumConfig)("showElektronischeVerarbeitungNotification",o.showElektronischeVerarbeitungNotification)("vlForm",o.formGroup)("zielmarktKonflikte",(s=o.model.zielmarktkonflikte)!==null&&s!==void 0?s:fo(13,np))("errorMessage",o.displayMessage)("notificationTestId",o.notificationId)("minMaxConfig",o.minMaxConfig),a(),p("buttonConfigs",o.buttonConfigs)("pending",o.pending)}},dependencies:[te,X,Z,ne,ee,Uo],encapsulation:2});let e=t;return e})(),ip=(e,t)=>new Le({betrag:e.controls.betrag,zahlungsrhytmus:e.controls.zahlungsrhytmus,ausfuehrungsDatum:e.controls.ausfuehrungsDatum,uebermittlungElektronischerVermoegensbescheinigung:e.controls.uebermittlungElektronischerVermoegensbescheinigung,angemessenheitsPruefung:new Le({conflicts:$n(t)})});var rp=e=>({"vl-neukauf-disable-scrollbar":e});function op(e,t){e&1&&(l(0,"vh-notification",7),_(1),d(2,"translate"),c()),e&2&&(a(),M(" ",f(2,1,"VL_NEUKAUF_NEW_FONDS_NO_SELECTION")," "))}var bs=(()=>{let t=class t extends ie{constructor(n,i,o,s){super(),this.vlFondsSucheViewModel=n,this.vlNeukaufViewModel=i,this.modalService=o,this.viewportScroller=s,this.destroy$=new Te,this.buttonConfigs={nextButton:{dataTestId:"vl-neukauf-weiter"},abortButton:{dataTestId:"vl-neukauf-abbrechen"}},this.showNoSelectionOverlay=!1,this.pending=!1,this.CLOSE_REASON=K,this.VL_NEUKAUF_FEHLENDE_DOKUMENTE=Gr,this.VL_NEUKAUF_ZIELMARKTKONFLIKTE=$r,this.showAusgabeAufschlag=this.vlFondsSucheViewModel.showAusgabeAufschlag(),this.produkttyp$=this.vlFondsSucheViewModel.getProduktTypeFondsucheProduktType$()}get disableAllControls$(){return this.vlFondsSucheViewModel.disableAllControls$}setFonds(n){this.currentFonds=n,this.model.selectedFonds=this.currentFonds}checkFundAndLoadZielmarktkonflikte(){if(!this.currentFonds){this.showNoSelectionOverlay=!0;let n=document.getElementById("vl-neukauf-scrolling-element");n&&(n.scrollTop=0),this.viewportScroller.scrollToPosition([0,0]);return}this.pending=!0,Xt([this.vlFondsSucheViewModel.checkAndEnrich$(this.currentFonds),this.vlNeukaufViewModel.zielmarktkonflikte$(this.currentFonds.isin)]).subscribe(([n,i])=>{switch(this.model.zielmarktkonflikte=i,n.pruefungsErgebnis){case re.ERFOLG:this.model.selectedFonds=this.currentFonds,this.navigateTo.emit(Zt.ANLAGEZIEL_EDITOR);break;case re.FEHLENDE_VERKAUFSUNTERLAGEN:this.modalService.open(Gr.overlayId);break;case re.FEHLENDE_ZIELMARKTINFORMATIONEN:this.modalService.open($r.overlayId);break;default:st()}this.pending=!1})}hideScrollbar(){let n=document.getElementById("vl-neukauf-fondssuche")?.offsetHeight,i=document.getElementById("vl-neukauf-scrolling-element")?.offsetHeight;return n&&i?n<=i:!1}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}};t.\u0275fac=function(i){return new(i||t)(x(Gi),x(Zi),x(at),x(So))},t.\u0275cmp=P({type:t,selectors:[["app-vl-neukauf-fondssuche"]],standalone:!0,features:[W,G],decls:11,vars:24,consts:[[3,"title"],[3,"title","removeBorderOnMobile","ngClass"],["id","vl-neukauf-scrolling-element",1,"vl-neukauf-fnsrch-content-delimiter"],["class","mrg-b-4-bd","type","error",4,"ngIf"],["id","vl-neukauf-fondssuche",3,"selectedFond","allowMultiSelection","ausgabeaufschlagAnzeigen","controlsDisabled$","produktTyp","includeEtfs","showUnionInvestFondsOnlyToggle","isVl"],[3,"abortButton","nextButton","buttonConfigs","pending"],[3,"transactionType"],["type","error",1,"mrg-b-4-bd"]],template:function(i,o){i&1&&(l(0,"or-ui-transaktion-container",0),d(1,"translate"),l(2,"or-ui-transaktion-card",1),d(3,"translate"),l(4,"div",2),y(5,op,3,3,"vh-notification",3),l(6,"fnsrch-fondssuche-container",4),d(7,"async"),b("selectedFond",function(m){return o.setFonds(m)}),c()()(),l(8,"or-ui-transaktion-button-group",5),b("abortButton",function(){return o.closeEvent.emit(o.CLOSE_REASON.CANCELLED)})("nextButton",function(){return o.checkFundAndLoadZielmarktkonflikte()}),c()(),U(9,"app-transaktion-error-modal",6)(10,"app-transaktion-error-modal",6)),i&2&&(p("title",f(1,16,"VL_NEUKAUF_TITEL")),a(2),p("title",f(3,18,"VL_NEUKAUF_NEUER_FONDS_CTA_TEXT"))("removeBorderOnMobile",!0)("ngClass",he(22,rp,o.hideScrollbar())),a(3),p("ngIf",o.showNoSelectionOverlay),a(),p("allowMultiSelection",!1)("ausgabeaufschlagAnzeigen",o.showAusgabeAufschlag)("controlsDisabled$",o.disableAllControls$)("produktTyp",f(7,20,o.produkttyp$))("includeEtfs",!1)("showUnionInvestFondsOnlyToggle",!1)("isVl",!0),a(2),p("buttonConfigs",o.buttonConfigs)("pending",o.pending),a(),p("transactionType",o.VL_NEUKAUF_FEHLENDE_DOKUMENTE),a(),p("transactionType",o.VL_NEUKAUF_ZIELMARKTKONFLIKTE))},dependencies:[Hi,zi,Ut,q,Ve,X,Z,ne,_n,Ne,Oe,te,ee],styles:[".hide[_ngcontent-%COMP%]{display:none}.icon-attention-red[_ngcontent-%COMP%]{color:var(--color-group-35);font-size:20px}.form-control-error[_ngcontent-%COMP%]   i.icon.icon-attention-red[_ngcontent-%COMP%]{color:unset}.text-align-right[_ngcontent-%COMP%]{text-align:right}.text-align-center[_ngcontent-%COMP%]{text-align:center}.flow-text[_ngcontent-%COMP%]{font-size:16px;line-height:22px}.headline[_ngcontent-%COMP%]{text-align:center}.h1-order[_ngcontent-%COMP%], .h2[_ngcontent-%COMP%], .h3[_ngcontent-%COMP%], .h4[_ngcontent-%COMP%]{margin-bottom:20px;font-weight:700}.h1-order[_ngcontent-%COMP%]{color:var(--color-group-1);font-family:var(--vh-font-family-1);font-weight:var(--vh-font-weight-1);text-transform:var(--vh-text-transform-1);font-size:var(--vh-font-size-1);line-height:var(--vh-line-height-1)}@media (min-width: 1440px){.h1-order[_ngcontent-%COMP%]{font-size:48px}}.h2-order-details-headline[_ngcontent-%COMP%]{color:var(--color-group-69);font-family:var(--vh-font-family-2);font-weight:var(--vh-font-weight-2);text-transform:var(--vh-text-transform-2);font-size:var(--vh-font-size-2);line-height:var(--vh-line-height-2)}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:20px}.margin-complete-component[_ngcontent-%COMP%]{margin:40px 0}.radio-seperator[_ngcontent-%COMP%]{margin:0 10px;color:var(--color-group-69);font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.document-downloaded[_ngcontent-%COMP%]{color:var(--color-group-33)}@media screen and (width <= 767px){.button[_ngcontent-%COMP%]{margin-left:0;margin-right:0}}.mrg-b-1-bd[_ngcontent-%COMP%]{margin-bottom:4px}.mrg-b-2-bd[_ngcontent-%COMP%]{margin-bottom:8px}.mrg-b-4-bd[_ngcontent-%COMP%]{margin-bottom:16px}.mrg-b-6-bd[_ngcontent-%COMP%]{margin-bottom:24px}.mrg-b-8-bd[_ngcontent-%COMP%]{margin-bottom:32px}.mrg-b-10-bd[_ngcontent-%COMP%]{margin-bottom:40px}.mrg-t-3-bd[_ngcontent-%COMP%]{margin-top:16px}.mrg-t-6-bd[_ngcontent-%COMP%]{margin-top:24px}.mrg-t-7-bd[_ngcontent-%COMP%]{margin-top:28px}.mrg-t-8-bd[_ngcontent-%COMP%]{margin-top:32px}.mrg-t-12-bd[_ngcontent-%COMP%]{margin-top:48px}.details-margin-top[_ngcontent-%COMP%]{margin-top:40px}.confirmation-subline[_ngcontent-%COMP%]{font-size:16px}.subline[_ngcontent-%COMP%]{text-align:center;font-family:var(--vh-font-family-6);font-weight:var(--vh-font-weight-6);text-transform:var(--vh-text-transform-6);font-size:var(--vh-font-size-6);line-height:var(--vh-line-height-6)}.container-fluid[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px;max-width:1260px;margin-left:auto;margin-right:auto}@media (width >= 768px){.container-fluid[_ngcontent-%COMP%]{padding-left:30px;padding-right:30px}}main[_ngcontent-%COMP%]{min-height:calc(100vh - 200px)}.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:8px}@media (min-width: 768px){.margin-labeled-content[_ngcontent-%COMP%]{margin-bottom:16px}}.margin-labeled-content[_ngcontent-%COMP%]:last-child{margin-bottom:0}.mt-between-boxes[_ngcontent-%COMP%]{margin-top:24px}@media (width >= 768px){.mt-between-boxes[_ngcontent-%COMP%]{margin-top:30px}}.button-group[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}@media (width <= 576px){.button-group[_ngcontent-%COMP%]{flex-direction:column;align-items:center}}.vl-neukauf-fnsrch-content-delimiter[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{display:none}@media (min-width: 576px){.vl-neukauf-fnsrch-content-delimiter[_ngcontent-%COMP%]{overflow-y:scroll;max-height:65vh}.vl-neukauf-fnsrch-content-delimiter[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{display:block}}.vl-neukauf-disable-scrollbar[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.vl-neukauf-disable-scrollbar[_ngcontent-%COMP%]   .vl-neukauf-fnsrch-content-delimiter[_ngcontent-%COMP%]{scrollbar-width:none}"]});let e=t;return e})();function ap(e,t){if(e&1){let r=Y();l(0,"app-vl-neukauf-fondssuche",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",r.model)}}function sp(e,t){if(e&1){let r=Y();l(0,"app-anlageziel-editor",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",r.model)}}var Os=(()=>{let t=class t extends sn{constructor(n){super(),this.router=n,this.VlNeukaufSteps=Zt,this.currentStep=Zt.FONDSSUCHE}ngOnInit(){this.model={}}closeWizard(n){switch(n){case K.CANCELLED:this.router.navigate([jt,Mt.DEPOT_UEBERSICHT]).then();break;default:st()}}};t.\u0275fac=function(i){return new(i||t)(x(be))},t.\u0275cmp=P({type:t,selectors:[["app-vl-neukauf"]],standalone:!0,features:[W,G],decls:3,vars:2,consts:[[3,"submit"],[3,"model","navigateTo","closeEvent",4,"ngIf"],[3,"navigateTo","closeEvent","model"]],template:function(i,o){i&1&&(l(0,"form",0),b("submit",function(m){return m.preventDefault()}),y(1,ap,1,1,"app-vl-neukauf-fondssuche",1)(2,sp,1,1,"app-anlageziel-editor",1),c()),i&2&&(a(),p("ngIf",o.currentStep===o.VlNeukaufSteps.FONDSSUCHE),a(),p("ngIf",o.currentStep===o.VlNeukaufSteps.ANLAGEZIEL_EDITOR))},dependencies:[q,ot,Rt,rt,Is,bs],encapsulation:2});let e=t;return e})(),Zt=function(e){return e.FONDSSUCHE="FONDSSUCHE",e.ANLAGEZIEL_EDITOR="ANLAGEZIEL_EDITOR",e}(Zt||{});var jt="EXTERN",Mt=function(e){return e.ANLAGEZIEL_UEBERSICHT="ANLAGEZIEL_UEBERSICHT",e.DEPOT_UEBERSICHT="DEPOT_UEBERSICHT",e}(Mt||{}),Xr="depot/1",nS=[{path:`depot/:${Ae.DEPOT_IDX}`,canActivate:[rs,is,as],children:[{path:"",loadComponent:()=>import("./chunk-LIOBBSK7.js").then(e=>e.TableContainerComponent),pathMatch:"full"},{path:`transaction/:${Ae.ORDER_TX_ID}/buy`,component:Nn,resolve:{[bn]:Bt,[On]:Bt}},{path:`auftrag/:${Ae.ORDER_TX_ID}/vl-neukauf`,component:Nn,resolve:{[bn]:Bt,[On]:Bt}},{path:"neukauf",canActivate:[Ho],component:ds},{path:"vl-neukauf",canActivate:[Go],component:Os},{path:`anlageziel/:${Ae.ANLAGEZIEL_ID}`,canActivate:[os,ss],children:[{path:`order/:${Ae.ORDER_TX_ID}`,loadChildren:()=>import("./chunk-GY6UXTGR.js").then(e=>e.lightweightOrderRoutes)},{path:"draft/order",loadComponent:()=>import("./chunk-YD5YMZ6V.js").then(e=>e.BuyAnlagezielContainerComponent)},{path:"",canActivate:[zo],loadChildren:()=>import("./chunk-YORWQPWM.js").then(e=>e.transaktionenRoutes)}]},{path:`order/:${Ae.ORDER_TX_ID}`,children:[{path:"cancel",component:Nn,resolve:{[bn]:Wr,[On]:Wr}},{path:"abraeumsparen",component:Nn,resolve:{[bn]:Bt,[On]:Bt}}]}]},{path:"service",canActivate:[Ro],loadChildren:()=>import("./chunk-ZKACMP3G.js").then(e=>e.supportLightweightOrderRoutes)},{path:"not-authorized",loadComponent:()=>import("./chunk-NAZ2B3Y2.js").then(e=>e.NotAuthorizedComponent)},{path:jt,children:[{path:Mt.ANLAGEZIEL_UEBERSICHT,resolve:{navigatesToExtern:ts},children:[]},{path:Mt.DEPOT_UEBERSICHT,resolve:{navigatesToExtern:ns},children:[]}]},{path:"**",redirectTo:Xr,pathMatch:"full"}];var lp=e=>({fondsName:e});function cp(e,t){if(e&1){let r=Y();l(0,"app-select-new-or-existing-fund-step",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",he(1,lp,r.model==null||r.model.sourceUnterdepot==null?null:r.model.sourceUnterdepot.name))}}function pp(e,t){if(e&1){let r=Y();l(0,"app-choose-existing-fund-step-container",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",r.model)}}function up(e,t){if(e&1){let r=Y();l(0,"app-umtausch-new-fonds-suche-step",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",r.model)}}function dp(e,t){if(e&1){let r=Y();l(0,"app-select-amount-step-container",2),b("navigateTo",function(i){R(r);let o=T();return D(o.navigateTo(i))})("closeEvent",function(i){R(r);let o=T();return D(o.closeWizard(i))}),c()}if(e&2){let r=T();p("model",r.model)}}var vS=(()=>{let t=class t extends sn{constructor(n,i,o){super(),this.depotIdxService=n,this.router=i,this.umtauschViewModel=o,this.UmtauschSteps=xe,this.currentStep=xe.SELECT_NEW_OR_EXISTING}ngOnInit(){this.unterdepotId=this.depotIdxService.getAnlagezielId(),this.model=this.umtauschViewModel.starteUmtausch(this.unterdepotId)}closeWizard(n){switch(n){case K.CANCELLED:this.router.navigate([jt,Mt.ANLAGEZIEL_UEBERSICHT]).then();break;default:st()}}};t.\u0275fac=function(i){return new(i||t)(x(Ke),x(be),x(wi))},t.\u0275cmp=P({type:t,selectors:[["app-umtausch"]],standalone:!0,features:[W,G],decls:5,vars:4,consts:[[3,"submit"],[3,"model","navigateTo","closeEvent",4,"ngIf"],[3,"navigateTo","closeEvent","model"]],template:function(i,o){i&1&&(l(0,"form",0),b("submit",function(m){return m.preventDefault()}),y(1,cp,1,3,"app-select-new-or-existing-fund-step",1)(2,pp,1,1,"app-choose-existing-fund-step-container",1)(3,up,1,1,"app-umtausch-new-fonds-suche-step",1)(4,dp,1,1,"app-select-amount-step-container",1),c()),i&2&&(a(),p("ngIf",o.currentStep===o.UmtauschSteps.SELECT_NEW_OR_EXISTING),a(),p("ngIf",o.currentStep===o.UmtauschSteps.CHOOSE_EXISTING_FUND),a(),p("ngIf",o.currentStep===o.UmtauschSteps.FONDS_UMTAUSCH_SEARCH),a(),p("ngIf",o.currentStep===o.UmtauschSteps.SELECT_AMOUNT))},dependencies:[Qo,q,ot,Rt,rt,X,za,Xa,es],encapsulation:2});let e=t;return e})(),xe=function(e){return e.SELECT_NEW_OR_EXISTING="SELECT_NEW_OR_EXISTING",e.CHOOSE_EXISTING_FUND="CHOOSE_EXISTING_FUND",e.FONDS_UMTAUSCH_SEARCH="FONDS_UMTAUSCH_SEARCH",e.SELECT_AMOUNT="SELECT_AMOUNT",e}(xe||{});var Ns=e=>e===424||e===503;var Wi=(()=>{let t=class t{constructor(n,i,o,s){this.depotIndexService=n,this.httpClient=i,this.offlineService=o,this.authProvider=s,this.URL="/customer-functional-service/customer"}static mapToInternalBankAccounts(n){if(n.iban!=null)return{iban:n.iban,bankName:n.bankName,onlineType:n.onlineType,sepaActivated:n.bankAccountMandate!=null&&t.isSepaActivated(n.bankAccountMandate.state),sepaActivatable:n.bankAccountMandate==null||n.bankAccountMandate.activatable,hasSepaMandate:n.bankAccountMandate!=null&&n.bankAccountMandate?.hasSepaMandate,offlineMigratable:n.offlineMigratable,transactionConstraints:{permittedForIncreasingTransaction:n.transactionConstraints.permittedForIncreasingTransaction,permittedForDecreasingTransaction:n.transactionConstraints.permittedForDecreasingTransaction},accountOwner:{daskaKndNr:n?.accountOwnerCustomer?.daskaKndNr,firstName:n?.accountOwnerCustomer?.firstName,lastName:n?.accountOwnerCustomer?.lastName,displayName:n?.accountOwner}}}static isSepaActivated(n){return!(n===qr.MIGRATED||n===qr.ONE_TIME_MANDATE)}getBankAccounts$(){let n=`${this.URL}/depot/${this.depotIndexService.getDepotIndex()}/bank-accounts`;return this.authProvider.isCustomerReadonly$().pipe(de(i=>i?this.httpClient.get(n).pipe(N({error:o=>{Ns(o?.status)&&this.offlineService.registerDaskaOfflineResponse(z.CUSTOMER_FS_BANK_ACCOUNTS)}}),v(o=>o.map(s=>t.mapToInternalBankAccounts(s)).filter(s=>!!s))):F([])))}};t.\u0275fac=function(i){return new(i||t)(h(ce),h(ae),h(ln),h(xo))},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),qr=function(e){return e.ACTIVE="ACTIVE",e.MIGRATED="MIGRATED",e.TERMINATION_BY_DATE="TERMINATION_BY_DATE",e.TERMINATION="TERMINATION",e.EXPIRED="EXPIRED",e.COMPLETED="COMPLETED",e.COMPLETED_TO_RLS="COMPLETED_TO_RLS",e.ONE_TIME_MANDATE="ONE_TIME_MANDATE",e}(qr||{});var As=(()=>{let t=class t{};t.type="[BankAccounts] ordering load state";let e=t;return e})();var Xi,qi=function(e){return e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADED=1]="LOADED",e}(qi||{}),fp="ordering_bestand_bank_accounts",Yr={paymentMethodsLoadedState:qi.NOT_LOADED,all:[]},Je,Wt=(Je=class{constructor(t,r){this.customerService=t,this.depotIndexService=r,this.requestManager=pe.forDepotIndexUnawareState()}static getFilteredBankAccounts(t){return _e([Xi],r=>{let n=[];t.filterPermittedForIncreasingTransaction&&n.push(o=>o.transactionConstraints.permittedForIncreasingTransaction),t.filterPermittedForDecreasingTransaction&&n.push(o=>o.transactionConstraints.permittedForDecreasingTransaction);let i=r.all;return n.forEach(o=>i=i.filter(o)),i})}static hasNoOnlinePaymentMethodForDecreasing(t){return this.hasNoOnlinePaymentMethodForFilterConfig(t,{filterPermittedForDecreasingTransaction:!0})}static hasNoOnlinePaymentMethodForIncreasing(t){return this.hasNoOnlinePaymentMethodForFilterConfig(t,{filterPermittedForIncreasingTransaction:!0})}static hasNoOnlinePaymentMethodForFilterConfig(t,r){return t.paymentMethodsLoadedState===qi.NOT_LOADED?!1:Xi.getFilteredBankAccounts(r)(t).length===0}loadBankAccounts$({setState:t}){let r=()=>{t(fe(o=>{o.paymentMethodsLoadedState=Yr.paymentMethodsLoadedState,o.all=Yr.all}))},n=F(null).pipe(N(r)),i=this.customerService.getBankAccounts$().pipe(v(o=>{t(fe(s=>{s.all=o,s.paymentMethodsLoadedState=qi.LOADED}))}));return this.requestManager.executeRequest(this.depotIndexService.getDepotIndex(),se.onlyOnce(),jn(n,i))}},Xi=Je,Je.\u0275fac=function(r){return new(r||Je)(h(Wi),h(ce))},Je.\u0275prov=C({token:Je,factory:Je.\u0275fac}),Je);I([J(As),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",j)],Wt.prototype,"loadBankAccounts$",null);I([V([Wt]),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Boolean)],Wt,"hasNoOnlinePaymentMethodForDecreasing",null);I([V([Wt]),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Boolean)],Wt,"hasNoOnlinePaymentMethodForIncreasing",null);Wt=Xi=I([le({name:fp,defaults:Yr}),u("design:paramtypes",[Wi,an])],Wt);var Jr=(()=>{let t=class t{constructor(n){this.unterdepotId=n}};t.type="[IFvvZielmarktKonflikt] FvvZielmarktKonflikt load state";let e=t;return e})();var ys=["HORIZON_INITIAL_HINT","HORIZON_INITIAL_OVERLAY","HORIZON_USERTRIGGERED"],Ms=["INVESTORTYPE_INITIAL_HINT","INVESTORTYPE_INITIAL_OVERLAY","INVESTORTYPE_USERTRIGGERED"];var Cn=function(e){return e.HORIZON="HORIZON",e.INVESTORTYPE="INVESTORTYPE",e.HORIZON_AND_INVESTORTYPE="HORIZON_AND_INVESTORTYPE",e.HORIZON_MISSING="HORIZON_MISSING",e}(Cn||{});var xs=(e,t)=>{let r=[],n=gp(e);return n&&r.push(n),t&&r.push(Cn.HORIZON_MISSING),r},gp=({containsHorizon:e,containsInvestortype:t})=>{if(e&&t)return Cn.HORIZON_AND_INVESTORTYPE;if(t)return Cn.INVESTORTYPE;if(e)return Cn.HORIZON};var hp="bestand_fvv_zielmarktkonflikt";ua();var ht,Yi=(ht=class{constructor(t){this.anlagezielService=t,this.requestManager=new pe}static getFvvZielmarktKonflikte(t){return r=>t[r]}loadFvvZielmarktKonflikte({setState:t},{unterdepotId:r}){let n=this.getLegalHints$(r).pipe(N(i=>{t(fe(o=>{o[r]=i}))}));return this.requestManager.executeRequest(r,se.onlyOnce(),n)}getLegalHints$(t){return this.anlagezielService.getLegalHints$(t).pipe(v(r=>{let n={containsHorizon:r.some(o=>ys.includes(o)),containsInvestortype:r.some(o=>Ms.includes(o))},i=r.includes("TARGET_MARKET_HORIZON_MISSING");return xs(n,i)}))}},ht.\u0275fac=function(r){return new(r||ht)(h(ve))},ht.\u0275prov=C({token:ht,factory:ht.\u0275fac}),ht);I([J(Jr),u("design:type",Function),u("design:paramtypes",[Object,Jr]),u("design:returntype",j)],Yi.prototype,"loadFvvZielmarktKonflikte",null);I([V(),u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",Function)],Yi,"getFvvZielmarktKonflikte",null);Yi=I([le({name:hp,defaults:{}}),u("design:paramtypes",[ve])],Yi);export{qa as a,As as b,Wt as c,Bn as d,wt as e,It as f,Vo as g,ar as h,Ce as i,Ee as j,Rn as k,Dn as l,xr as m,ir as n,rr as o,L as p,Di as q,wa as r,dt as s,mt as t,wr as u,yt as v,Jr as w,Yi as x,Ke as y,Cp as z,Tp as A,$o as B,Fr as C,em as D,tm as E,Ko as F,jo as G,Zo as H,Wo as I,yi as J,Xo as K,Cm as L,Tm as M,Pr as N,El as O,Ia as P,Im as Q,xi as R,kn as S,Fe as T,Un as U,xl as V,mn as W,Ma as X,Vm as Y,Bm as Z,Fi as _,Fa as $,$m as aa,Km as ba,Ua as ca,Gn as da,$n as ea,di as fa,Ya as ga,f_ as ha,g_ as ia,h_ as ja,Qa as ka,vS as la,gt as ma,a0 as na,ms as oa,gs as pa,hs as qa,_s as ra,jt as sa,Mt as ta,nS as ua};
