1import{P as Dn,da as jl}from"./chunk-B7NIRUN7.js";import{a as Ve,b as Co}from"./chunk-AO2GUA2U.js";import{I as di,Wc as Mn,pa as Pn}from"./chunk-K6XRCBRQ.js";import"./chunk-NOUSXFNR.js";import"./chunk-HDQKW4QJ.js";import"./chunk-BAUIZTJM.js";import"./chunk-VEXHCVD6.js";import"./chunk-EODLABCK.js";import"./chunk-LNNOXUAH.js";import{c as Ct,e as No}from"./chunk-5WJWZR2B.js";import"./chunk-ZRS7GAXI.js";import"./chunk-27C5J323.js";import"./chunk-FNU43ISP.js";import"./chunk-3QTOSQHN.js";import"./chunk-INPI4WN4.js";import"./chunk-SHPZ6B23.js";import"./chunk-XE4CWKXC.js";import"./chunk-ERUXDYEF.js";import"./chunk-PWH55DW5.js";import"./chunk-HHZAFBZJ.js";import"./chunk-XD7VRJHZ.js";import"./chunk-67YYZTRY.js";import"./chunk-YKSIEQOM.js";import"./chunk-6CBRVZP7.js";import"./chunk-3E5AODRN.js";import"./chunk-FL3MZTGQ.js";import"./chunk-RAZAA3LF.js";import"./chunk-ROWVUZQ5.js";import"./chunk-NBNCFXXD.js";import"./chunk-GLVG4YKJ.js";import{a as On,d as Vl}from"./chunk-VYH7FIBL.js";import"./chunk-RXH3SBGJ.js";import"./chunk-4UKHHAM4.js";import"./chunk-NNYVCRBG.js";import"./chunk-L6VAB72E.js";import"./chunk-EYZZTOB2.js";import"./chunk-HJJTM4YZ.js";import{a as Nn,d as Cn,e as zl,f as Rn,g as Hl}from"./chunk-KDIZ673D.js";import{a as Sn}from"./chunk-5ZY5DPXR.js";import"./chunk-KYFTVFW5.js";import"./chunk-HV3AGVQQ.js";import"./chunk-S37DANKA.js";import{a as gn,c as Xe,e as Fo}from"./chunk-EXKGI2HL.js";import{G as St,H as _i,J as Nt,K as So,o as He}from"./chunk-YH2BMM64.js";import"./chunk-YKZVJ74I.js";import"./chunk-3DKFID3P.js";import"./chunk-T4BUL6B6.js";import"./chunk-JNY25NHM.js";import"./chunk-3YIKXJBA.js";import"./chunk-4YIWZVON.js";import"./chunk-AIXGHK3A.js";import{J as Ln,oa as fn,ra as fe,sa as ft}from"./chunk-34AQ4RF4.js";import{c as Lt,d as si,g as Fn,h as Xl,m as ze,n as fo,q as le,u as Ft}from"./chunk-4AZ7E375.js";import{C as Yl,c as mn,d as un,e as En,i as kl,x as An}from"./chunk-DL2NLTKM.js";import"./chunk-C4CN6VUL.js";import"./chunk-RMA2HIQT.js";import"./chunk-RSNEGWS4.js";import{i as it,j as Le,r as Tt}from"./chunk-2WVVQYB4.js";import{K as Et,L as At,N as Lo,P as jt}from"./chunk-H4AV54LV.js";import{h as pn,j as cn,k as In,l as xl,n as Tn,o as ai}from"./chunk-NMDT7KP5.js";import{b as ot,e as sn,f as li}from"./chunk-LJSTVY2I.js";import{Nb as ut,ha as gt,ra as mt}from"./chunk-JUMBU524.js";import"./chunk-AAJMGBNN.js";import{e as dn,p as Ul}from"./chunk-3P2XXC4G.js";import{b as _n,d as vl}from"./chunk-R4655YNO.js";import{Ua as Fe,Ya as pt,d as mo,j as Ge,jb as ct,p as Ht,qa as $e,ta as dt,tb as Ao,ua as Q,wb as Vt}from"./chunk-E7BPQBRH.js";import"./chunk-AGDP37NI.js";import{F as ke,I as Ye,J as re,i as we,j as ve,r as It,w as uo,x as Eo,y as Ue,z as xe}from"./chunk-BTYWQ7SO.js";import{e as Je,f as et,g as tt,j as nn}from"./chunk-NKXYGIDJ.js";import{a as Ee,b as To,c as Ae,e as an,f as ri,g as Be,h as go}from"./chunk-YOA2FHGI.js";import{C as U,D as ue,E as $,a as P,b as te,r as X,u as R,v as rn,x as ln}from"./chunk-FILPITJF.js";import"./chunk-72NVTSOJ.js";import{e as Ji,f as $l}from"./chunk-3Z7KUK52.js";import{D as tn,F as on,I as wl,x as en}from"./chunk-YOUCZKXO.js";import"./chunk-DCKIUH2K.js";import{$c as _e,D as ne,Da as ki,Dd as Vi,De as B,Ed as ji,Ee as c,Fa as so,Fd as Ki,Fe as Qi,Kd as co,La as Me,Ld as Io,Oc as L,P as Ui,Qa as T,Qc as F,Rc as Xi,Sc as ye,Tc as ge,Uc as me,Vc as a,Wc as s,We as A,Xb as l,Xc as _,Xd as Wi,Ya as f,Yc as I,Za as S,Zc as K,_ as xi,_c as se,ad as _o,bd as po,ce as qi,de as Qe,ee as Zi,fd as D,gd as be,ib as v,ke as ii,lb as De,md as zi,me as ni,nd as Hi,od as G,pb as he,qc as C,qd as Yt,rd as Xt,td as m,ud as zt,vc as Yi,vd as p,we as z,za as oi}from"./chunk-KXLDY3WT.js";import{a as g,b as u,e as E}from"./chunk-OUBPMQVY.js";var W,pi,Rt,nt,w,rt,Kt,oe=E(()=>{W=function(t){return t.Base="BASE",t.Emergency="EMERGENCY",t;}(W||{}),pi=function(t){return t.Camt052B="CAMT_052B",t.Camt052Bt="CAMT_052BT",t.Camt053S="CAMT_053S",t.Camt054C="CAMT_054C",t.Camt054D="CAMT_054D",t.Pain001="PAIN_001",t.Pain002="PAIN_002",t;}(pi||{}),Rt=function(t){return t.CreateDate="CREATE_DATE",t.FileName="FILE_NAME",t.FileType="FILE_TYPE",t.OriginatorId="ORIGINATOR_ID",t;}(Rt||{}),nt=function(t){return t.Asc="ASC",t.Desc="DESC",t;}(nt||{}),w=function(t){return t.Accepted="ACCEPTED",t.InProgress="IN_PROGRESS",t.Rejected="REJECTED",t;}(w||{}),rt=function(t){return t.FileId="FILE_ID",t.FileName="FILE_NAME",t.Status="STATUS",t.UploadDate="UPLOAD_DATE",t;}(rt||{}),Kt=function(t){return t.CorporateConnectFileDownload="CORPORATE_CONNECT_FILE_DOWNLOAD",t.CorporateConnectFileEmergency="CORPORATE_CONNECT_FILE_EMERGENCY",t.CorporateConnectFileUpload="CORPORATE_CONNECT_FILE_UPLOAD",t;}(Kt||{});});var hn,yn,bn,Bn,Ot,Wt,Ro,Gn,Oo,$n,Pt,j,de,wn,qt,Ne,pe,M,ce,Mt,lt,Ie,je,Ke,vn,Un,xn,kn,Po,Yn,Mo,Xn,zn,Hn,Vn,hs,ys,jn,Ce,We,Kn,Wn,qe,N,J,Ze,qn,ee,h,Do,Zn,Qn,Jn,er,ho,y=E(()=>{oe();hn=100*1024*1024,yn="application/zip",bn="application/x-zip-compressed",Bn="-",Ot={NoFile:"V\xE4lj en fil att ladda upp.",NotXML:"V\xE4lj en fil med fil\xE4ndelse xml.",NotZIP:"V\xE4lj en fil med fil\xE4ndelse ZIP.",ExceedsMaxSize:"V\xE4lj en fil som \xE4r mindre \xE4n 100 MB.",FileNameHasSpecialCharacters:"Kontrollera att filnamnet inte inneh\xE5ller specialtecknen [] () <> \\ / : | ? \" * %"},Wt={InvalidExtension:"Fel fil\xE4ndelse",ExceedsMaxSize:"F\xF6r stor fil",FileNameHasSpecialCharacters:"Filnamnet f\xE5r inte inneh\xE5lla specialtecken"},Ro="fileAdministration",Gn="N\xE5got gick fel. F\xF6rs\xF6k igen om en stund.",Oo="sb-1459_EmergencyRoutine_targetid",$n="sb-1459_MultiZippedFileDownload_targetid",Pt=function(t){return t.Uploaded="uploaded",t.FileName="fileName",t.FileId="fileId",t.Status="statusFormatted",t;}(Pt||{}),j=function(t){return t.UploadFile="UploadFile",t.AllFiles="AllFiles",t.Reporting="Reporting",t;}(j||{}),de=function(t){return t.UploadFile="",t.AllFiles="alla-filer",t.Reporting="rapportering",t;}(de||{}),wn={[de.UploadFile]:j.UploadFile,[de.AllFiles]:j.AllFiles,[de.Reporting]:j.Reporting},qt={[w.Accepted]:"Godk\xE4nd",[w.InProgress]:"Under behandling",[w.Rejected]:"Avvisad"},Ne=50,pe=18,M=function(t){return t.DateFrom="dateFrom",t.DateTo="dateTo",t.StatusAccepted="accepted",t.StatusInProgress="inProgress",t.StatusRejected="rejected",t;}(M||{}
1),ce=function(t){return t.Date="date",t.Status="status",t;}(ce||{}),Mt=Array(Ne).fill({}),lt=function(t){return t.Selected="selected",t.Date="date",t.FileName="fileName",t.Type="fileType",t.Originator="originatorName",t.OriginatorId="originatorId",t;}(lt||{}),Ie=function(t){return t.Date="date",t.Type="fileType",t.OriginatorId="originatorId",t;}(Ie||{}),je="REPORTING_FILES_ERROR",Ke=function(t){return t.FileUploadDialog="FileUploadDialog",t.FileAdminCorp="FileAdminCorp",t;}(Ke||{}),vn="PRODUCT_PART_NOT_FOUND",Un="CORPORATE_CONNECT_FILE_UPLOAD_ENTITLEMENT_NOT_FOUND",xn="CORPORATE_CONNECT_FILE_DOWNLOAD_ENTITLEMENT_NOT_FOUND",kn="Inga avvisade filer",Po="Inga filer",Yn="Inga rapporteringsfiler",Mo="REPORTING_FILE_DIALOG_ERROR_PLACEMENT",Xn="600px",zn="548px",Hn=2e3,Vn="Status",hs="Filtyp",ys="Skapad av",jn="Laddar upp",Ce=function(t){return t.FileUpload="CSAT_Corp_FileAdmin_FileUpload",t.AllUploadedFiles="CSAT_Corp_FileAdmin_AllUploadedFiles",t.Reporting="CSAT_Corp_FileAdmin_Reporting",t;}(Ce||{}),We={FileUpload:"Hur var din upplevelse av fliken \u201CLadda upp filer\u201D?",AllUploadedFiles:"Hur var din upplevelse av fliken \u201CAlla uppladdade filer\u201D?",Reporting:"Hur var din upplevelse av fliken \u201CRapportering\u201D?"},Kn=" https://www.swedbank.se/foretag/betala-och-ta-betalt/ny-standard-for-betalningar-i-sverige.html",Wn="https://www.swedbank.se/om-oss/kontakta-oss/kontor.html",qe=function(t){return t.InvalidFileType="INVALID_FILE_TYPE",t.InvalidOriginator="INVALID_ORIGINATOR",t.InvalidXml="INVALID_XML",t.FileNameTooLong="FILE_NAME_TOO_LONG",t.FileSizeTooLarge="FILE_SIZE_TOO_LARGE",t.CreationDateInFuture="CREATION_DATE_IN_THE_FUTURE",t.CreationDateTooOld="CREATION_DATE_TOO_OLD",t.FileNameHasSpecialCharacters="FILE_NAME_HAS_SPECIAL_CHARACTERS",t;}(qe||{}),N=function(t){return t.DateFrom="dateFrom",t.DateTo="dateTo",t.Statuses="statuses",t.FileTypes="fileTypes",t.OriginatorIds="originatorIds",t;}(N||{}),J=function(t){return t.Id="id",t.Label="label",t.IsSelected="isSelected",t;}(J||{}),Ze=function(t){return t.Xml=".xml",t.Zip=".zip",t;}(Ze||{}),qn="540px",ee=function(t){return t[t.UploadFile=1]="UploadFile",t[t.AllFiles=2]="AllFiles",t[t.Reporting=3]="Reporting",t;}(ee||{}),h=function(t){return t.UploadDialog="1a",t.UploadButton="1b",t.RadioButtonStandard="1c",t.RadioButtonBackup="1d",t.SuccessfulUpload="1e",t.DownloadDialog="3a",t.DownloadButton="3b",t.MultipleDownloadDialog="3c",t.MultipleDownloadButton="3d",t;}(h||{}),Do={[j.UploadFile]:{index:ee.UploadFile,description:"Upload File tab"},[h.UploadDialog]:{index:h.UploadDialog,description:"Open upload file dialog"},[h.UploadButton]:{index:h.UploadButton},[h.RadioButtonStandard]:{index:h.RadioButtonStandard,description:"Radio button Standard"},[h.RadioButtonBackup]:{index:h.RadioButtonBackup,description:"Radio button Backup Routine"},[h.SuccessfulUpload]:{index:h.SuccessfulUpload},[j.AllFiles]:{index:ee.AllFiles,description:"All Files tab"},[j.Reporting]:{index:ee.Reporting,description:"Reporting tab"},[h.DownloadDialog]:{index:h.DownloadDialog,description:"Open report download dialog"},[h.DownloadButton]:{index:h.DownloadButton,description:"Downloading report"},[h.MultipleDownloadDialog]:{index:h.MultipleDownloadDialog},[h.MultipleDownloadButton]:{index:h.MultipleDownloadButton}},Zn={Downloaded:"Nerladdad",Download:"Ladda ner",Error:"Filen kunde inte laddas ner. F\xF6rs\xF6k igen om en stund."},Qn=/[\[\]()<>\\\/:|?\"*%]+/,Jn=80,er=20,ho="filadministration";});var yo,bo,Zt,Qt,Jt,eo,Bo=E(()=>{nn();yo=(t,r)=>({method:tt.Post,path:"/payments/file-transfer/payment-experience-orchestrator/payment-corporate/v1/file-administration/upload",options:{query:{uploadType:t.uploadType},headers:r}}),bo=(t,r)=>({method:tt.Post,path:"/payments/file-transfer/payment-experience-orchestrator/payment-corporate/v1/file-administration/download/reporting-files",responseType:"blob",options:{body:{fileUids:t.fileUids},headers:r}}),Zt=(t,r)=>({method:tt.Get,path:"/payments/file-transfer/payment-experience-orchestrator/payment-corporate/v1/file-administration/reporting-files",options:{query:{createDateFrom:t.createDateFrom,createDateTo:t.createDateTo,fileTypes:t.fileTypes,originatorIds:t.originatorIds,sortProperty:t.sortProperty,sortDirection:t.sortDirection,pageSize:t.pageSize,page:t.page},headers:r}}),Qt=(t,r)=>({method:tt.Get,path:"/payments/file-transfer/payment-experience-orchestrator/payment-corporate/v1/file-administration/file-logs",options:{query:{uploadDateFrom:t.uploadDateFrom,uploadDateTo:t.uploadDateTo,statuses:t.statuses,sortProperty:t.sortProperty,sortDirection:t.sortDirection,pageSize:t.pageSize,page:t.page},headers:r}}),Jt=(t,r)=>({method:tt.Get,path:`/payments/file-transfer/payment-experience-orchestrator/payment-corporate/v1/file-administration/download/reporting-file/${t.uid}`,options:{path:{uid:t.uid},headers:r}}),eo=t=>({method:tt.Get,path:"/payments/file-transfer/payment-experience-orchestrator/payment-corporate/v1/file-administration/authorisations",options:{headers:t}}
1);});var Dt,ci,vs,Kl,Wl,Ii,or,to,Ti,gi,oo,mi,io,ui,Re,Ei,Ai,Li,Go,no,ro,Fi,$o,fi,lo,ir=E(()=>{li();nn();$();Bo();Dt="[Andromeda API PaymentsFileTransferPaymentExperienceOrchestratorPaymentCorporate v1]",ci=`${Dt} Upload file`,vs=P(ci,({payload:t,headers:r})=>u(g({},yo(t,r)),{apiType:ot,successAction:Kl,failureAction:Wl,payload:t})),Kl=P(`${ci} ${Je}`,te()),Wl=P(`${ci} ${et}`,te()),Ii=`${Dt} Download reporting files zip`,or=P(Ii,({payload:t,headers:r})=>u(g({},bo(t,r)),{apiType:ot,successAction:to,failureAction:Ti,payload:t})),to=P(`${Ii} ${Je}`,te()),Ti=P(`${Ii} ${et}`,te()),gi=`${Dt} Fetch reporting files`,oo=P(gi,({payload:t,headers:r})=>u(g({},Zt(t,r)),{apiType:ot,successAction:mi,failureAction:io,payload:t})),mi=P(`${gi} ${Je}`,te()),io=P(`${gi} ${et}`,te()),ui=`${Dt} Fetch file logs`,Re=P(ui,({payload:t,headers:r})=>u(g({},Qt(t,r)),{apiType:ot,successAction:Ei,failureAction:Ai,payload:t})),Ei=P(`${ui} ${Je}`,te()),Ai=P(`${ui} ${et}`,te()),Li=`${Dt} Download reporting file`,Go=P(Li,({payload:t,headers:r})=>u(g({},Jt(t,r)),{apiType:ot,successAction:no,failureAction:ro,payload:t})),no=P(`${Li} ${Je}`,te()),ro=P(`${Li} ${et}`,te()),Fi=`${Dt} Fetch authorisations`,$o=P(Fi,({headers:t}={})=>u(g({},eo(t)),{apiType:ot,successAction:fi,failureAction:lo,payload:{}})),fi=P(`${Fi} ${Je}`,te()),lo=P(`${Fi} ${et}`,te());});var nr=E(()=>{li();Bo();});var rr,lr=E(()=>{A();li();Bo();A();rr=(()=>{class t{constructor(){this.http=T(sn);}uploadFile(e,o){let i=yo(e,o),n=new FormData();return e.file!==void 0&&n.append("file",e.file),this.http.upload(i,n);}downloadReportingFilesZip(e,o,i){return this.http.request(bo(e,i),o);}fetchReportingFiles(e,o,i){return this.http.request(Zt(e,i),o);}fetchFileLogs(e,o,i){return this.http.request(Qt(e,i),o);}downloadReportingFile(e,o,i){return this.http.request(Jt(e,i),o);}fetchAuthorisations(e,o){return this.http.request(eo(o),e);}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵprov=Me({token:t,factory:t.ɵfac,providedIn:"root"});}}return t;})();});var ie=E(()=>{ir();nr();lr();});var q,Oe=E(()=>{A();oe();Yl();kl();y();A();q=(()=>{class t{constructor(){this.flowManager=T(An),this.flowConf={name:"file-admin-flow",type:mn.Application,behaviourType:un.SelfService,category:En.PaymentsTransfers,version:"v1"},this.flowService=this.flowManager.get(this.flowConf);}trackTabClicks(e){let o=Do[e];this.flowService.step({stepIndex:o.index,stepDescription:o.description||""}),this.flowService.send();}endFileAdminFlow(e){let o=Do[e];this.flowService.step({stepIndex:o.index,stepDescription:`Ending flow from ${e} tab `,isComplete:!0}),this.flowService.send();}trackSubItem(e){let o=Do[e];this.flowService.step({stepIndex:o.index,stepDescription:o.description||"",isSubStep:!0}),this.flowService.send();}trackFileUpload(e,o){let i=e===W.Base?"Standard":"Backup Routine";this.flowService.reset(),this.flowService.step({stepIndex:o?h.SuccessfulUpload:h.UploadButton,stepDescription:o?`Successfully uploaded ${i} file`:`Uploading ${i} file`}),this.flowService.send();}trackMultipleReportsDownloadDialog(e){this.flowService.step({stepIndex:h.MultipleDownloadDialog,stepDescription:`Open multiple reports download dialog with ${e} selected`}),this.flowService.send();}trackZipReportsDownload(e){this.flowService.step({stepIndex:h.MultipleDownloadButton,stepDescription:`Downloading multiple reports with ${e} file`}),this.flowService.send();}trackFlowError(e,o){let i;if(typeof e=="string")i=[e];else{let n=e?.general?.map(O=>`${O.code}: ${O.message}`),d=e?.fields?.map(O=>`${O.field}: ${O.message}`);i=[...(n||[]),...(d||[])];}this.flowService.reset(),this.flowService.step({stepIndex:o,stepDescription:"Application Error"}),this.flowService.sendErrors(i);}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵprov=Me({token:t,factory:t.ɵfac,providedIn:"root"});}}return t;})();});
1var Te,wo,vo,Uo,xo,ko,Yo,Xo,zo,Ho,Vo,at=E(()=>{$();Te=function(t){return t.InitiateFileLogsFetch="[FileAdministration] Initiate File Logs Fetch",t.InitiateFileLogsFetchRejected="[FileAdministration] Initiate File Logs Fetch Rejected",t.InitiateFileLogsFetchAll="[FileAdministration] Initiate File Logs Fetch All",t.AddFileLogs="[FileAdministration] Add File Logs",t.AddFileLogsRejected="[FileAdministration] Add File Logs Rejected",t.AddFileLogsAll="[FileAdministration] Add File Logs All",t.CatchFileLogsFail="[FileAdministration] Catch File Logs Fail",t.CatchFileLogsFailRejected="[FileAdministration] Catch File Logs Fail Rejected",t.CatchFileLogsFailAll="[FileAdministration] Catch File Logs Fail All",t.CreateDownloadBatches="[FileAdministration] Create Download Batches",t;}(Te||{}),wo=P(Te.InitiateFileLogsFetch),vo=P(Te.InitiateFileLogsFetchRejected),Uo=P(Te.InitiateFileLogsFetchAll),xo=P(Te.AddFileLogs,t=>({fileLogs:t})),ko=P(Te.AddFileLogsRejected,t=>({fileLogs:t})),Yo=P(Te.AddFileLogsAll,(t,r,e)=>({fileLogs:t,totalPages:r,totalLogs:e})),Xo=P(Te.CatchFileLogsFail),zo=P(Te.CatchFileLogsFailRejected),Ho=P(Te.CatchFileLogsFailAll),Vo=P(Te.CreateDownloadBatches,t=>({files:t}));});function ar(t,r){return Zl(t,r);}var jo,ql,Zl,Si=E(()=>{go();$();at();jo=Be({selectId:t=>t.uid}),ql=jo.getInitialState({allFileLogsStatus:{loading:!1,loaded:!1}}),Zl=ue(ql,U(Uo,t=>u(g({},t),{allFileLogsStatus:{loading:!0,loaded:!1}})),U(Yo,(t,r)=>jo.setAll(r.fileLogs,u(g({},t),{allFileLogsStatus:{loading:!1,loaded:!0},totalPages:r.totalPages,totalLogs:r.totalLogs}))),U(Ho,t=>u(g({},t),{allFileLogsStatus:{loading:!1,loaded:!1}})));});function sr(t,r){return Jl(t,r);}var Ql,Jl,_r=E(()=>{ie();$();Ql={entitlementsLoadingStatus:{loading:!1,loaded:!1},productParts:[],userEntitlements:[],entitledOriginators:[],allowedFileTypes:[]},Jl=ue(Ql,U($o,t=>u(g({},t),{entitlementsLoadingStatus:{loaded:!1,loading:!0}})),U(fi,(t,r)=>u(g({},t),{entitlementsLoadingStatus:{loaded:!0,loading:!1},productParts:r.payload.userProductParts||[],userEntitlements:r.payload.userEntitlements||[],entitledOriginators:r.payload.entitledOriginatorIds||[],allowedFileTypes:r.payload.allowedFileTypes||[]})),U(lo,t=>u(g({},t),{entitlementsLoadingStatus:{loaded:!1,loading:!1}})));});function dr(t,r){return ta(t,r);}var Ko,ea,ta,Ni=E(()=>{go();$();at();Ko=Be({selectId:t=>t.uid}),ea=Ko.getInitialState({latestFileLogsStatus:{loading:!1,loaded:!1}}),ta=ue(ea,U(wo,t=>u(g({},t),{latestFileLogsStatus:{loading:!0,loaded:!1}})),U(xo,(t,r)=>Ko.setAll(r.fileLogs,u(g({},t),{latestFileLogsStatus:{loading:!1,loaded:!0}}))),U(Xo,t=>u(g({},t),{latestFileLogsStatus:{loading:!1,loaded:!1}})));});function pr(t,r){return ia(t,r);}var Wo,oa,ia,Ci=E(()=>{go();$();at();Wo=Be({selectId:t=>t.uid}),oa=Wo.getInitialState({latestRejectedFileLogsStatus:{loading:!1,loaded:!1}}),ia=ue(oa,U(vo,t=>u(g({},t),{latestRejectedFileLogsStatus:{loading:!0,loaded:!1}})),U(ko,(t,r)=>Wo.setAll(r.fileLogs,u(g({},t),{latestRejectedFileLogsStatus:{loading:!1,loaded:!0}}))),U(zo,t=>u(g({},t),{latestRejectedFileLogsStatus:{loading:!1,loaded:!1}})));});function ht(){return t=>u(g({},t),{uploaded:t.uploadDateTime?t.uploadDateTime.substring(0,10):"",statusFormatted:t.status?qt[t.status]:"",typeFormatted:yt(t.type)});}function yt(t){if(t){let[r,e]=t.split("_");return`${r[0]}${r.slice(1).toLowerCase()}.${e}`;}return"";}function bt(t){let r=t.join(","),e=0;for(let o=0;o<r.length;o++){let i=r.charCodeAt(o);e=(e*31+i)%2147483647;}return e.toString(36);}function cr(t){if(!t)return null;let r=t.lastIndexOf(".");return r===-1?null:t.substring(r+1);}var Pe=E(()=>{y();});function Tr(t,r){return ra(t,r);}function la(t,r){let e=[],o=[],i=0;for(let n of t)i+n.sizeMb<=r?(o.push(n),i+=n.sizeMb):(o.length>0&&e.push(Ir(e.length+1,o)),o=[n],i=n.sizeMb);return o.length>0&&e.push(Ir(e.length+1,o)),e;}function Ir(t,r){return{name:`Zip ${t}`,filename:`${t}.zip`,files:r};}var qo,na,ra,Ri=E(()=>{ie();go();$();y();Pe();at();qo=Be({selectId:t=>t.uid}),na=qo.getInitialState({reportingFilesStatus:{loading:!1,loaded:!1},originatorsLoadingStatus:{loading:!1,loaded:!1},isDownloadingInProgress:!1,multipleFilesDownloadBatches:{}}),ra=ue(na,U(oo,t=>u(g({},t),{reportingFilesStatus:{loading:!0,loaded:!1}})),U(mi,(t,r)=>qo.setAll(r.payload.content||[],u(g({},t),{reportingFilesStatus:{loading:!1,loaded:!0},totalPages:r.payload.totalPages,totalReports:r.payload.totalElements}))),U(io,t=>u(g({},t),{reportingFilesStatus:{loading:!1,loaded:!1}})),U(Go,t=>u(g({},t),{isDownloadingInProgress:!0})),U(no,ro,t=>u(g({},t),{isDownloadingInProgress:!1})),U(Vo,(t,r)=>{let e=la(r.files,Hn),o=Object.fromEntries(e.map(i=>[bt(i.files.map(n=>n.id)),i]));return u(g({},t),{multipleFilesDownloadBatches:o});}),U(to,(t,r)=>{let e=bt(r.callerPayload.fileUids);return u(g({},t),{multipleFilesDownloadBatches:u(g({},t.multipleFilesDownloadBatches),{[e]:u(g({},t.multipleFilesDownloadBatches[e]),{downloaded:!0})})});}),U(Ti,(t,r)=>{let e=bt(r.callerPayload.fileUids);return u(g({},t),{multipleFilesDownloadBatches:u(g({},t.multipleFilesDownloadBatches),{[e]:u(g({},t.multipleFilesDownloadBatches[e]),{downloaded:!1,error:r.error})})});}));});var gr,mr=E(()=>{Si();_r();Ni();Ci();Ri();gr={latestFileLogs:dr,latestRejectedFileLogs:pr,allFileLogs:ar,reportingFiles:Tr,entitlement:sr};});var Se,st=E(()=>{$();y();Se=rn(Ro);});var Zo,aa,ur,sa,Er,Ar,Lr,Fr=E(()=>{$();Pe();Si();st();Zo=R(Se,t=>
1t.allFileLogs),{selectAll:aa}=jo.getSelectors(Zo),ur=R(aa,t=>t.map(ht())),sa=R(Zo,t=>t.allFileLogsStatus),Er=R(sa,t=>!!t.loading),Ar=R(Zo,t=>t.totalPages),Lr=R(Zo,t=>t.totalLogs);});var ao,_a,fr,Sr,Nr,Cr,Oi,Rr,Or,Pr,Mr,Dr,hr=E(()=>{oe();ai();$();y();st();ao=R(Se,t=>t.entitlement),_a=R(ao,t=>t.entitlementsLoadingStatus),fr=R(_a,t=>!!t.loading),Sr=R(ao,t=>t.productParts),Nr=R(Sr,t=>t.includes(W.Base)),Cr=R(Sr,pn(Oo),(t,r)=>r&&t.includes(W.Emergency)),Oi=R(ao,t=>t.userEntitlements),Rr=R(Oi,t=>t.includes(Kt.CorporateConnectFileUpload)),Or=R(Oi,t=>t.includes(Kt.CorporateConnectFileDownload)),Pr=R(Oi,t=>t.includes(Kt.CorporateConnectFileEmergency)),Mr=R(ao,t=>t.entitledOriginators),Dr=R(ao,t=>t.allowedFileTypes);});var yr,da,br,pa,Br,Pi=E(()=>{$();Pe();Ni();st();yr=R(Se,t=>t.latestFileLogs),{selectAll:da}=Ko.getSelectors(yr),br=R(da,t=>t.map(ht())),pa=R(yr,t=>t.latestFileLogsStatus),Br=R(pa,t=>!!t.loading);});var Gr,ca,$r,Ia,wr,Mi=E(()=>{$();Pe();Ci();st();Gr=R(Se,t=>t.latestRejectedFileLogs),{selectAll:ca}=Wo.getSelectors(Gr),$r=R(ca,t=>t.map(ht())),Ia=R(Gr,t=>t.latestRejectedFileLogsStatus),wr=R(Ia,t=>!!t.loading);});function ma(t,r){return dt(new Date(t),"yyyy-MM-dd, HH:mm",{locale:r});}var Bt,Ta,vr,ga,Ur,xr,kr,Yr,Di,Xr,zr=E(()=>{ut();Vt();$();pt();No();y();Pe();Ri();st();Bt=R(Se,t=>t.reportingFiles),{selectAll:Ta}=qo.getSelectors(Bt),vr=R(Ta,gt,(t,r)=>t.map(e=>u(g({},e),{fileType:yt(e.type),originatorName:e.originatorName||Bn,date:e.createDateTime?ma(e.createDateTime,r===Ge.SV?Ct:$e):"",icon:"download"}))),ga=R(Bt,t=>t.reportingFilesStatus),Ur=R(ga,t=>!!t.loading),xr=R(Bt,t=>t.totalPages),kr=R(Bt,t=>t.totalReports),Yr=R(Bt,t=>t.isDownloadingInProgress),Di=R(Bt,t=>t.multipleFilesDownloadBatches),Xr=R(Di,t=>Object.values(t));});var hi=E(()=>{Fr();hr();st();Pi();Mi();zr();});var _t=E(()=>{mr();hi();});function ua(t,r){t&1&&(K(0,"acorn-message",1)(1,"acorn-message-body"),G(2,0),se()());}function Ea(t,r){if(t&1&&(K(0,"acorn-message",2)(1,"acorn-message-body"),co(2),se()()),t&2){let e,o=p();l(2),Io((e=o.fileLog())==null?null:e.reasonForRejection);}}var Hr,Vr=E(()=>{A();oe();ft();A();Hr=(()=>{class t{constructor(){this.fileLog=c(),this.uploadDateTime=z(()=>this.fileLog()?.uploadDateTime||""),this.fileStatuses=w,this.dateFormat="yyyy-MM-dd",this.dateTimeFormat="yyyy-MM-dd HH:mm";}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-file-log-details"]],inputs:{fileLog:[1,"fileLog"]},decls:21,vars:16,consts:()=>{let e;e="Skapad";let o;o="Datum";let i;i="Filinformation";let n;n="Storlek";let d;d="Filtyp";let O;O="Skapad av";let x;x="Id";let k;k="Uppladdad av";let b;b="Namn";let ae;return ae="Filvalidering \xE4r under behandling",[ae,["severity","warning"],["severity","error"],["heading",e],["layout","one-line"],["label",o,3,"value"],["heading",i],["label",n,3,"value"],["label",d,3,"value"],["heading",O],["label",x,3,"value"],["heading",k],["layout","two-line"],["label",b,3,"value","subValue"]];},template:function(o,i){if(o&1&&(L(0,ua,3,0,"acorn-message",1),L(1,Ea,3,1,"acorn-message",2),K(2,"acorn-list"),_e(3,"acorn-list-header",3),K(4,"acorn-list-body",4),_e(5,"acorn-list-body-item",5),ii(6,"fdpDate"),se()(),K(7,"acorn-list"),_e(8,"acorn-list-header",6),K(9,"acorn-list-body",4),_e(10,"acorn-list-body-item",7)(11,"acorn-list-body-item",8),se()(),K(12,"acorn-list"),_e(13,"acorn-list-header",9),K(14,"acorn-list-body",4),_e(15,"acorn-list-body-item",10),se()(),K(16,"acorn-list"),_e(17,"acorn-list-header",11),K(18,"acorn-list-body",12),_e(19,"acorn-list-body-item",13),ii(20,"fdpDate"),se()()),o&2){let n,d,O,x,k,b,ae;F(((n=i.fileLog())==null?null:n.status)===i.fileStatuses.InProgress?0:-1),l(),F((d=i.fileLog())!=null&&d.reasonForRejection?1:-1),l(4),be("value",ni(6,10,((O=i.fileLog())==null?null:O.creationDateTime)??"",i.dateFormat)),l(5),be("value",Wi("",(x=i.fileLog())==null||x.fileSize==null?null:x.fileSize.size," ",(x=i.fileLog())==null||x.fileSize==null?null:x.fileSize.unit)),l(),be("value",(k=i.fileLog())==null?null:k.typeFormatted),l(4),be("value",(b=i.fileLog())==null?null:b.originatorId),l(4),be("value",(ae=i.fileLog())==null?null:ae.uploadedBy)("subValue",ni(20,13,i.uploadDateTime(),i.dateTimeFormat));}},dependencies:[fn],encapsulation:2,changeDetection:0});}}return t;})();});var jr,Qo,Bi=E(()=>{A();re();Ft();ft();pt();y();A();Xl();fo();re();jr=t=>({invalidDateRange:t}),Qo=(()=>{class t{constructor(){this.dateFrom=c(""),this.dateTo=c(""),this.formGroup=c(),this.startDate=Q(Fe(Date.now(),pe),{representation:"date"}),this.endDate=Q(Date.now(),{representation:"date"}),this.filterNames=M,this.pastMonths=pe;}ngOnChanges(){this.formGroup()?.controls[M.DateFrom].setValue(this.dateFrom()||""),this.formGroup()?.controls[M.DateTo].setValue(this.dateTo()||"");}static{this.ɵfac=function(o){return new(o||t)();};}
1static{this.ɵcmp=C({type:t,selectors:[["fdp-date-filter-chip"]],inputs:{dateFrom:[1,"dateFrom"],dateTo:[1,"dateTo"],formGroup:[1,"formGroup"]},features:[he],decls:15,vars:17,consts:()=>{let e;e="Fr\xE5n";let o;o="Till";let i;i="V\xE4lj eller fyll i ett datum inom de senaste "+"\uFFFD0\uFFFD"+" m\xE5naderna";let n;n="V\xE4lj eller fyll i tidigast dagens datum";let d;d="V\xE4lj eller fyll i datum \xC5\xC5\xC5\xC5-MM-DD";let O;O="V\xE4lj eller fyll i ett datum inom de senaste "+"\uFFFD0\uFFFD"+" m\xE5naderna";let x;x="V\xE4lj eller fyll i tidigast dagens datum";let k;return k="V\xE4lj eller fyll i datum \xC5\xC5\xC5\xC5-MM-DD",[i,n,d,O,x,k,[3,"formGroup"],["name","from","label",e,3,"formControlName","startDate","endDate","openAt","error"],["error","rangeUnderflow","slot","error"],["error","rangeOverflow","slot","error"],["error","typeMismatch","slot","error"],["name","to","label",o,3,"formControlName","startDate","endDate","openAt","error"]];},template:function(o,i){if(o&1&&(s(0,"form",6)(1,"acorn-date-picker",7)(2,"acorn-form-field-error",8),G(3,0),_(),s(4,"acorn-form-field-error",9),G(5,1),_(),s(6,"acorn-form-field-error",10),G(7,2),_()(),s(8,"acorn-date-picker",11)(9,"acorn-form-field-error",8),G(10,3),_(),s(11,"acorn-form-field-error",9),G(12,4),_(),s(13,"acorn-form-field-error",10),G(14,5),_()()()),o&2){let n,d;a("formGroup",i.formGroup()),l(),a("formControlName",i.filterNames.DateFrom)("startDate",i.startDate)("endDate",i.endDate)("openAt",i.endDate)("error",Qe(13,jr,(n=i.formGroup())==null||n.errors==null?null:n.errors.invalidDateRange)),l(2),Yt(i.pastMonths),Xt(3),l(5),a("formControlName",i.filterNames.DateTo)("startDate",i.startDate)("endDate",i.endDate)("openAt",i.endDate)("error",Qe(15,jr,(d=i.formGroup())==null||d.errors==null?null:d.errors.invalidDateRange)),l(2),Yt(i.pastMonths),Xt(10);}},dependencies:[fe,Fn,ze,le,Ye,It,we,ve,xe,Ue],encapsulation:2,changeDetection:0});}}return t;})();});var Wr,qr=E(()=>{A();re();Ft();ft();y();A();si();fo();re();Wr=(()=>{class t{constructor(){this.formGroup=c(),this.filterNames=M;}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-logs-status-filter-chip"]],inputs:{formGroup:[1,"formGroup"]},decls:4,vars:4,consts:()=>{let e;e="Godk\xE4nd";let o;o="Under behandling";let i;return i="Avvisad",[[3,"formGroup"],["label",e,3,"formControlName"],["label",o,3,"formControlName"],["label",i,3,"formControlName"]];},template:function(o,i){o&1&&(s(0,"acorn-checkbox-group",0),I(1,"acorn-checkbox",1)(2,"acorn-checkbox",2)(3,"acorn-checkbox",3),_()),o&2&&(a("formGroup",i.formGroup()),l(),a("formControlName",i.filterNames.StatusAccepted),l(),a("formControlName",i.filterNames.StatusInProgress),l(),a("formControlName",i.filterNames.StatusRejected));},dependencies:[fe,Lt,ze,Ye,we,ve,xe,Ue,le],encapsulation:2,changeDetection:0});}}return t;})();});var Aa,Zr,Qr=E(()=>{A();re();oe();pt();No();y();Bi();qr();A();Aa=["fdp-all-file-logs-toolbar",""],Zr=(()=>{class t{constructor(){this.formBuilder=T(ke),this.dateFilterForm=c.required(),this.statusFilterForm=c.required(),this.locale=c($e),this.filters=c({}),this.textSearchQuery=B(),this.clearTextFilter=B(),this.resetCurrentTablePage=B(),this.updateFilters=B(),this.startDate=Q(Fe(Date.now(),pe),{representation:"date"}),this.endDate=Q(Date.now(),{representation:"date"}),this.selectedFilters={date:0,status:0};}ngOnChanges(e){"filters"in e&&!e.filters.isFirstChange()&&this.updateSelectedFilters();}filterApply(e){for(let o of e.detail.filters)if(ce.Date===o){if(this.dateFilterForm().valid)this.applyDateFilter();else{e.preventDefault();break;}}else ce.Status===o&&this.applyStatusFilter();this.resetCurrentTablePage.emit();}filterClear(e){let o=e.detail.filters[0];ce.Date===o?this.updateDateFilters(void 0,void 0):ce.Status===o&&(this.statusFilterForm().controls[M.StatusAccepted].setValue(!1),this.statusFilterForm().controls[M.StatusInProgress].setValue(!1),this.statusFilterForm().controls[M.StatusRejected].setValue(!1),this.applyStatusFilter()),this.resetCurrentTablePage.emit();}applyDateFilter(){let e=this.dateFilterForm().controls[M.DateFrom].value,o=this.dateFilterForm().controls[M.DateTo].value;e||(e=this.startDate,this.dateFilterForm().controls[M.DateFrom].setValue(e)),o||(o=this.endDate,this.dateFilterForm().controls[M.DateTo].setValue(o)),this.updateDateFilters(e,o);}applyStatusFilter(){let e=[];this.statusFilterForm().controls[M.StatusAccepted].value&&e.push(w.Accepted),this.statusFilterForm().controls[M.StatusInProgress].value&&e.push(w.InProgress),this.statusFilterForm().controls[M.StatusRejected].value&&e.push(w.Rejected),this.updateStatusFilters(e);}updateSelectedFilters(){let e=this.filters().statuses;this.selectedFilters={date:this.filters().dateFrom||this.filters().dateTo?1:0,status:e?.length??0};}updateDateFilters(e,o){let i=new Map();i.set(N.DateFrom,e),i.set(N.DateTo,o),this.updateFilters.emit(i);}updateStatusFilters(e){let o=new Map();o.set(N.Statuses,e),this.updateFilters.emit(o);}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["acorn-filter-toolbar","fdp-all-file-logs-toolbar",""]],inputs:{dateFilterForm:[1,"dateFilterForm"],statusFilterForm:[1,"statusFilterForm"],locale:[1,"locale"],filters:[1,"filters"]},outputs:{textSearchQuery:"textSearchQuery",clearTextFilter:"clearTextFilter",resetCurrentTablePage:"resetCurrentTablePage",updateFilters:"updateFilters"},features:[he],attrs:Aa,decls:6,vars:8,consts:()=>{let e;e="Uppladdningsdatum";let o;return o="Status",[[3,"searchInput","clear"],["show-apply","",3,"filterClear","filterApply","numSelectedFilters"],["name","date","label",e,3,"selected"],[3,"dateFrom","dateTo","formGroup"],["name","status","label",o,3,"selected"],[3,"statuses","formGroup"]];},template:function(o,i){o&1&&(s(0,"acorn-filter-toolbar-search",0),m("searchInput",function(d){return i.textSearchQuery.emit(d);})("clear",function(){return i.clearTextFilter.emit();}),_(),s(1,"acorn-filter-toolbar-filters",1),m("filterClear",function(d){return i.filterClear(d);})("filterApply",function(d){return i.filterApply(d);}),s(2,"acorn-filter-toolbar-filters-item",2),I(3,"fdp-date-filter-chip",3),_(),s(4,"acorn-filter-toolbar-filters-item",4),I(5,"fdp-logs-status-filter-chip",5),_()()),o&2&&(l(),a("numSelectedFilters",i.selectedFilters.date+i.selectedFilters.status),l(),a("selected",i.selectedFilters.date),l(),a("dateFrom",i.filters().dateFrom)("dateTo",i.filters().dateTo)("formGroup",i.dateFilterForm()),l(),a("selected",i.selectedFilters.status),l(),a("statuses",i.filters().statuses)("formGroup",i.statusFilterForm()));},dependencies:[Qo,Wr],encapsulation:2,changeDetection:0});}}return t;})();});function La(t,r){if(t&1&&I(0,"acorn-applied-filters-item",10),t&2){let e=r.$implicit;a("value",e.value)("label",e.label);}}function Fa(t,r){if(t&1){let e=D();s(0,"acorn-filter-toolbar",8),m("textSearchQuery",function(i){f(e);let n=p();return S(n.onSearch(i));})("clearTextFilter",function(){f(e);let i=p();return S(i.onSearchClear());})("updateFilters",function(i){f(e);let n=p();return S(n.updateFilters(i));})("resetCurrentTablePage",function(){f(e);let i=p();return S(i.resetCurrentTablePage());}),_(),s(1,"acorn-applied-filters",9),m("clearFilter",function(i){f(e);let n=p();return S(n.onClearFilterApplied(i));}),ge(2,La,1,2,"acorn-applied-filters-item",10,ye),_();}if(t&2){let e=p();a("dateFilterForm",e.dateFilterForm)("statusFilterForm",e.statusFilterForm)("filters",e.filters()),l(2),me(e.appliedFilters());}}function fa(t,r){if(t&1){let e=D();s(0,"acorn-data-table-pagination",11),m("pageChanged",function(i){f(e);let n=p();return S(n.onPageChange(i));}),_();}if(t&2){let e=p();a("currentPage",e.currentPage())("rowsPerPage",e.rowsPerPage())("totalRowCount",e.totalLogs())("pageCount",e.totalPages());}}
1var Gt,Jo=E(()=>{A();re();oe();Ft();ut();Vt();$();pt();No();y();Qr();A();Gt=(()=>{class t{set statuses(e){e&&this.filters.update(o=>u(g({},o),{statuses:e}));}constructor(){this.store=T(X),this.formBuilder=T(ke),this.isToolbarEnabled=c(!1),this.fileLogs=c(Mt),this.totalPages=c(),this.totalLogs=c(),this.rowsPerPage=c(),this.isBusy=c(),this.markedLog=c(),this.messageEmpty=c(),this.tableRowClick=B(),this.applyFilters=B(),this.userLanguage=this.store.selectSignal(gt),this.locale=z(()=>this.userLanguage()===Ge.SV?Ct:$e),this.logsToDisplay=z(()=>{if(this.isToolbarEnabled()&&this.isBusy())return Mt;{let e=this.textSearchQuery()?.toUpperCase(),o;return e?o=this.fileLogs().filter(i=>i.fileName?.toUpperCase().includes(e)||i.fileId?.toUpperCase().includes(e)):o=this.fileLogs(),this.highlightedLog()?o.map(i=>u(g({},i),{active:i.uid===this.highlightedLog()})):o;}}),this.isSortable=z(()=>!!this.totalPages()&&this.logsToDisplay().length>1),this.highlightedLog=v(void 0),this.textSearchQuery=v(void 0),this.filterParams={date:{dateFrom:null,dateTo:null}},this.filters=v({dateFrom:void 0,dateTo:void 0,statuses:void 0,sortDirection:void 0,sortProperty:void 0,page:1}),this.previousFilters={dateFrom:void 0,dateTo:void 0,statuses:void 0,sortDirection:void 0,sortProperty:void 0,page:1},this.appliedFilters=v([]),this.isStatusFilterOpen=v(!1),this.currentPage=v(0),this.startDate=Q(Fe(Date.now(),pe),{representation:"date"}),this.endDate=Q(Date.now(),{representation:"date"}),this.dateFilterForm=this.formBuilder.group({dateFrom:["",[ct({startDate:this.startDate,endDate:this.endDate})]],dateTo:["",[ct({startDate:this.startDate,endDate:this.endDate})]]},{validators:[Ao.dateRange(M.DateFrom,M.DateTo)]}),this.statusFilterForm=this.formBuilder.group({accepted:[!1],inProgress:[!1],rejected:[!1]}),this.columnNames=Pt,this.sortProperties=rt,De(()=>{this.hasFiltersChanged()&&(this.previousFilters=this.filters(),this.applyFilters.emit(this.filters()),this.onChangeUpdateAppliedFilters()),this.updateHighlightedLog();});}rowClick(e){this.tableRowClick.emit(e.detail.rowData);}setDateFilter(e){let{dateFrom:o,dateTo:i}=e;this.filters.update(n=>u(g({},n),{dateFrom:o,dateTo:i,page:1})),this.updateAppliedFilters();}seStatusFilter(e){this.filters.update(o=>u(g({},o),{statuses:e,page:1})),this.updateAppliedFilters();}onClearFilter(e){let o=this.filters().statuses;e.detail.values.forEach(i=>{i===ce.Date?this.filters.update(n=>u(g({},n),{dateFrom:void 0,dateTo:void 0})):o=o?.filter(n=>n!==i);}),this.filters.update(i=>u(g({},i),{statuses:o?.length?o:void 0})),this.updateAppliedFilters();}onSearch(e){let o=e.detail.value;this.textSearchQuery.set(o);}onSearchClear(){this.textSearchQuery.set(void 0);}onPageChange(e){this.currentPage.set(e.detail.pageIndex),this.filters.update(o=>u(g({},o),{page:e.detail.pageIndex+1}));}onSort(e){let o=this.getSortProperty(e.detail.columnKey),i=e.detail.sortDirection==="ascending"?nt.Asc:nt.Desc;this.direction=e.detail.sortDirection,this.filters.update(n=>u(g({},n),{sortProperty:o,sortDirection:i}));}updateFilters(e){let o=g({},this.filters());e.has(N.DateFrom)&&(o.dateFrom=e.get(N.DateFrom)),e.has(N.DateTo)&&(o.dateTo=e.get(N.DateTo)),e.has(N.Statuses)&&(o.statuses=e.get(N.Statuses)),o.page=1,this.filters.set(o);}resetCurrentTablePage(){this.currentPage.set(-1);}onClearFilterApplied(e){let o=this.filters().statuses,i=new Map();e.detail.values.forEach(n=>{n===ce.Date?(i.set(N.DateFrom,void 0),i.set(N.DateTo,void 0)):o=o?.filter(d=>d!==n);}),this.statusFilterForm.controls[M.StatusAccepted].setValue(!!o?.includes(w.Accepted)),this.statusFilterForm.controls[M.StatusInProgress].setValue(!!o?.includes(w.InProgress)),this.statusFilterForm.controls[M.StatusRejected].setValue(!!o?.includes(w.Rejected)),i.set(N.Statuses,o?.length?o:void 0),this.updateFilters(i),this.resetCurrentTablePage();}updateAppliedFilters(){let e=[],o=this.filters().statuses;if(this.filters().dateFrom||this.filters().dateTo){let i={label:this.createDateLabel(this.filters().dateFrom,this.filters().dateTo),value:ce.Date};e.push(i);}o?.length&&o.forEach(i=>{e.push({label:`${Vn}: ${qt[i]}`,value:i});}),this.appliedFilters.set(e);}onChangeUpdateAppliedFilters(){let e=[],o=this.filters().statuses;if(this.filters().dateFrom||this.filters().dateTo){let i={label:this.createDateLabel(this.filters().dateFrom,this.filters().dateTo),value:ce.Date};e.push(i);}o?.length&&o.forEach(i=>
1{e.push({label:qt[i],value:i});}),this.appliedFilters.set(e);}hasFiltersChanged(){let e=this.previousFilters,o=this.filters();return e.dateFrom!==o.dateFrom||e.dateTo!==o.dateTo||e.statuses!==o.statuses||e.sortProperty!==o.sortProperty||e.sortDirection!==o.sortDirection||e.page!==o.page;}createDateLabel(e,o){let i=e?this.formatDate(e):"",n=o?this.formatDate(o):"";return`${i}${i&&n?" - ":""}${n}`;}formatDate(e){let o=dt(new Date(e),mo.DayShortMonthYear,{locale:this.locale()});return this.locale().code===Ge.SV?o.replace(".",""):o;}getSortProperty(e){return e===Pt.FileName?rt.FileName:e===Pt.FileId?rt.FileId:e===Pt.Status?rt.Status:rt.UploadDate;}updateHighlightedLog(){this.markedLog()&&this.fileLogs().some(e=>e.uid===this.markedLog())?this.highlightedLog.set(this.markedLog()):this.logsToDisplay().some(e=>e.active)&&this.highlightedLog.set(void 0);}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-file-logs-table"]],inputs:{isToolbarEnabled:[1,"isToolbarEnabled"],fileLogs:[1,"fileLogs"],totalPages:[1,"totalPages"],totalLogs:[1,"totalLogs"],rowsPerPage:[1,"rowsPerPage"],isBusy:[1,"isBusy"],markedLog:[1,"markedLog"],statuses:"statuses",messageEmpty:[1,"messageEmpty"]},outputs:{tableRowClick:"tableRowClick",applyFilters:"applyFilters"},decls:9,vars:16,consts:()=>{let e;e="Uppladdad";let o;o="Filnamn";let i;i="Fil-id";let n;return n="Status",[["row-header-column","none",3,"sort","messageEmpty"],["heading",e,"fixed-width","100",3,"columnKey","sortable","sorted"],["heading",o,3,"columnKey","sortable","sorted"],["heading",i,3,"columnKey","sortable","sorted"],["heading",n,"fixed-width","130",3,"columnKey","sortable","sorted"],["column-key","rowClick","column-type","row-link",3,"cellEvent"],[3,"rowData"],[3,"currentPage","rowsPerPage","totalRowCount","pageCount"],["fdp-all-file-logs-toolbar","",3,"textSearchQuery","clearTextFilter","updateFilters","resetCurrentTablePage","dateFilterForm","statusFilterForm","filters"],[3,"clearFilter"],[3,"value","label"],[3,"pageChanged","currentPage","rowsPerPage","totalRowCount","pageCount"]];},template:function(o,i){o&1&&(L(0,Fa,4,3),s(1,"acorn-data-table",0),m("sort",function(d){return i.onSort(d);}),I(2,"acorn-data-table-column",1)(3,"acorn-data-table-column",2)(4,"acorn-data-table-column",3)(5,"acorn-data-table-column",4),s(6,"acorn-data-table-column",5),m("cellEvent",function(d){return i.rowClick(d);}),_(),I(7,"acorn-data-table-row-group",6),L(8,fa,1,4,"acorn-data-table-pagination",7),_()),o&2&&(F(i.isToolbarEnabled()?0:-1),l(),a("messageEmpty",i.messageEmpty()),l(),a("columnKey",i.columnNames.Uploaded)("sortable",i.isSortable()?"custom":null)("sorted",i.filters().sortProperty===i.sortProperties.UploadDate&&i.direction?i.direction:null),l(),a("columnKey",i.columnNames.FileName)("sortable",i.isSortable()?"custom":null)("sorted",i.filters().sortProperty===i.sortProperties.FileName&&i.direction?i.direction:null),l(),a("columnKey",i.columnNames.FileId)("sortable",i.isSortable()?"custom":null)("sorted",i.filters().sortProperty===i.sortProperties.FileId&&i.direction?i.direction:null),l(),a("columnKey",i.columnNames.Status)("sortable",i.isSortable()?"custom":null)("sorted",i.filters().sortProperty===i.sortProperties.Status&&i.direction?i.direction:null),l(2),a("rowData",i.logsToDisplay()),l(),F(i.totalPages()?8:-1));},dependencies:[le,Zr],encapsulation:2,changeDetection:0});}}return t;})();});var Jr,el=E(()=>{A();ie();$();y();_t();Jo();A();Jr=(()=>{class t{constructor(){this.forcedFilter=c(),this.markedLog=c(),this.selectFileLog=B(),this.store=T(X),this.allFileLogs=this.store.selectSignal(ur),this.isAllFileLogsFetchBusy=this.store.selectSignal(Er),this.totalPages=this.store.selectSignal(Ar),this.totalLogs=this.store.selectSignal(Lr),this.rowsPerPage=Ne,this.messageEmpty=Po;}ngOnInit(){this.initialFileLogsFetch();}fetchWithParameters(e){this.store.dispatch(Re({payload:{page:e.page,pageSize:Ne,uploadDateFrom:e.dateFrom,uploadDateTo:e.dateTo,statuses:e.statuses,sortDirection:e.sortDirection,sortProperty:e.sortProperty}}));}initialFileLogsFetch(){this.forcedFilter()||this.store.dispatch(Re({payload:{page:1,pageSize:Ne}}));}static{this.ɵfac=function(o){return new(o||t)();};}
1static{this.ɵcmp=C({type:t,selectors:[["fdp-all-file-logs"]],inputs:{forcedFilter:[1,"forcedFilter"],markedLog:[1,"markedLog"]},outputs:{selectFileLog:"selectFileLog"},decls:1,vars:9,consts:[[3,"tableRowClick","applyFilters","fileLogs","isToolbarEnabled","totalPages","totalLogs","isBusy","rowsPerPage","statuses","messageEmpty","markedLog"]],template:function(o,i){o&1&&(s(0,"fdp-file-logs-table",0),m("tableRowClick",function(d){return i.selectFileLog.emit(d);})("applyFilters",function(d){return i.fetchWithParameters(d);}),_()),o&2&&a("fileLogs",i.allFileLogs())("isToolbarEnabled",!0)("totalPages",i.totalPages())("totalLogs",i.totalLogs())("isBusy",i.isAllFileLogsFetchBusy())("rowsPerPage",i.rowsPerPage)("statuses",i.forcedFilter())("messageEmpty",i.messageEmpty)("markedLog",i.markedLog());},dependencies:[Gt],encapsulation:2,changeDetection:0});}}return t;})();});function Na(t,r){if(t&1&&I(0,"fdp-feedback-targeted",1),t&2){let e=p(2);a("feedbackQuestion",e.questions.AllUploadedFiles)("flowTag",e.flowTags.AllUploadedFiles)("label",e.feedbackRatingLabel)("categoryId",e.feedbackCategoryId);}}function Ca(t,r){if(t&1){let e=D();L(0,Na,1,4,"fdp-feedback-targeted",1),s(1,"acorn-section"),I(2,"acorn-section-header",2),s(3,"acorn-section-body")(4,"fdp-all-file-logs",3),m("selectFileLog",function(i){f(e);let n=p();return S(n.fileLogOutput.emit(i));}),_()()();}if(t&2){let e=p();F(e.isClerk()?-1:0),l(4),a("forcedFilter",e.forcedFilter())("markedLog",e.selectedFileLogId());}}function Ra(t,r){t&1&&(s(0,"acorn-section"),I(1,"acorn-section-header",4),s(2,"acorn-section-body")(3,"acorn-message",5)(4,"acorn-message-body"),G(5,0),_()()()());}var Sa,ei,Gi=E(()=>{A();Co();So();y();el();A();_i();Sa=["fdp-all-files-page",""];ei=(()=>{class t{constructor(){this.isClerk=c.required(),this.hasUploadEntitlement=c.required(),this.forcedFilter=c(),this.selectedFileLogId=c(),this.fileLogOutput=B(),this.flowTags=Ce,this.questions=We,this.feedbackRatingLabel=He.CSAT,this.feedbackCategoryId=Ve.PaymentsAndTransfersFileTransfer;}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["acorn-custom-page-body","fdp-all-files-page",""]],inputs:{isClerk:[1,"isClerk"],hasUploadEntitlement:[1,"hasUploadEntitlement"],forcedFilter:[1,"forcedFilter"],selectedFileLogId:[1,"selectedFileLogId"]},outputs:{fileLogOutput:"fileLogOutput"},attrs:Sa,decls:2,vars:1,consts:()=>{let e;e="Alla uppladdade filer";let o;return o="Du kan inte se eller ladda upp filer. Kontakta ansvarig administrat\xF6r p\xE5 ditt f\xF6retag f\xF6r beh\xF6righet.",[o,["slot","section",1,"fdp-print--hide",3,"feedbackQuestion","flowTag","label","categoryId"],["heading",e],[3,"selectFileLog","forcedFilter","markedLog"],["heading","Empty heading","hide","true"],["severity","info"]];},template:function(o,i){o&1&&L(0,Ca,5,3)(1,Ra,6,0,"acorn-section"),o&2&&F(i.hasUploadEntitlement()?0:1);},dependencies:[Nt,St,Jr],encapsulation:2,changeDetection:0});}}return t;})();});function Oa(t,r){if(t&1&&(_o(0,2),I(1,"acorn-checkbox",3),po()),t&2){let e=r.$implicit,o=r.$index;a("formGroupName",o),l(),a("label",e.value.label)("value",e.value.id);}}var ol,il=E(()=>{A();re();Ft();ft();y();A();si();fo();re();ol=(()=>{class t{constructor(){this.formGroup=c.required();}get fileTypes(){return this.formGroup().get(N.FileTypes);}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-file-type-filter-chip"]],inputs:{formGroup:[1,"formGroup"]},decls:4,vars:1,consts:[[3,"formGroup"],["formArrayName","fileTypes"],[3,"formGroupName"],["formControlName","isSelected",3,"label","value"]],template:function(o,i){o&1&&(s(0,"form",0)(1,"acorn-checkbox-group",1),ge(2,Oa,2,3,"ng-container",2,ye),_()()),o&2&&(a("formGroup",i.formGroup()),l(2),me(i.fileTypes.controls));},dependencies:[fe,Lt,ze,Ye,It,we,ve,xe,Ue,uo,Eo,le],encapsulation:2,changeDetection:0});}}return t;})();});function Pa(t,r){if(t&1&&(_o(0,2),I(1,"acorn-checkbox",3),po()),t&2){let e=r.$implicit,o=r.$index;a("formGroupName",o),l(),a("label",e.value.label)("value",e.value.label);}}var nl,rl=E(()=>{A();re();Ft();ft();y();A();si();fo();re();nl=(()=>{class t{constructor(){this.formGroup=c.required();}get originatorIds(){return this.formGroup().get(N.OriginatorIds);}static{this.ɵfac=function(o){return new(o||t)();};}
1static{this.ɵcmp=C({type:t,selectors:[["fdp-originator-filter-chip"]],inputs:{formGroup:[1,"formGroup"]},decls:4,vars:1,consts:[[3,"formGroup"],["formArrayName","originatorIds"],[3,"formGroupName"],["formControlName","isSelected",3,"label","value"]],template:function(o,i){o&1&&(s(0,"form",0)(1,"acorn-checkbox-group",1),ge(2,Pa,2,3,"ng-container",2,ye),_()()),o&2&&(a("formGroup",i.formGroup()),l(2),me(i.originatorIds.controls));},dependencies:[fe,Lt,ze,Ye,It,we,ve,xe,Ue,uo,Eo,le],encapsulation:2,changeDetection:0});}}return t;})();});function Da(t,r){if(t&1&&(s(0,"acorn-filter-toolbar-filters-item",3),I(1,"fdp-file-type-filter-chip",5),_()),t&2){let e=p();a("selected",e.selectedFilters.types),l(),a("formGroup",e.fileTypesForm());}}function ha(t,r){if(t&1&&(s(0,"acorn-filter-toolbar-filters-item",4),I(1,"fdp-originator-filter-chip",5),_()),t&2){let e=p();a("selected",e.selectedFilters.originators),l(),a("formGroup",e.originatorsForm());}}var Ma,ll,al=E(()=>{A();re();pt();y();Bi();il();rl();A();Ma=["fdp-reporting-files-toolbar",""];ll=(()=>{class t{constructor(){this.formBuilder=T(ke),this.dateFilterForm=c.required(),this.fileTypesForm=c.required(),this.originatorsForm=c.required(),this.filters=c({}),this.types=c([]),this.originators=c([]),this.resetCurrentTablePage=B(),this.updateFilters=B(),this.selectedFilters={date:0,types:0,originators:0},this.startDate=Q(Fe(Date.now(),pe),{representation:"date"}),this.endDate=Q(Date.now(),{representation:"date"});}get fileTypes(){return this.fileTypesForm().get(N.FileTypes);}get originatorIds(){return this.originatorsForm().get(N.OriginatorIds);}ngOnChanges(e){"filters"in e&&!e.filters.isFirstChange()&&this.updateSelectedFilters();}filterApply(e){for(let o of e.detail.filters)if(Ie.Date===o){if(this.dateFilterForm().valid)this.applyDateFilter();else{e.preventDefault();break;}}else if(Ie.Type===o){let i=this.fileTypes.controls.map(n=>({id:n.get(J.Id)?.value,label:n.get(J.Label)?.value,checked:n.get(J.IsSelected)?.value}));this.updateFileTypeFilters(i);}else if(Ie.OriginatorId===o){let i=this.originatorIds.controls.map(n=>({id:n.get(J.Label)?.value,label:n.get(J.Label)?.value,checked:n.get(J.IsSelected)?.value}));this.updateOriginatorFilters(i);}this.resetCurrentTablePage.emit();}filterClear(e){let o=e.detail.filters[0];if(Ie.Date===o)this.updateDateFilters(void 0,void 0);else if(Ie.Type===o){for(let i=0;i<this.fileTypes.controls.length;i++)this.fileTypes.controls[i].get(J.IsSelected)?.setValue(!1);this.updateFileTypeFilters([]);}else if(Ie.OriginatorId===o){for(let i=0;i<this.originatorIds.controls.length;i++)this.originatorIds.controls[i].get(J.IsSelected)?.setValue(!1);this.updateOriginatorFilters([]);}this.resetCurrentTablePage.emit();}applyDateFilter(){let e=this.dateFilterForm().controls[M.DateFrom].value,o=this.dateFilterForm().controls[M.DateTo].value;e||(e=this.startDate,this.dateFilterForm().controls[M.DateFrom].setValue(e)),o||(o=this.endDate,this.dateFilterForm().controls[M.DateTo].setValue(o)),this.updateDateFilters(e,o);}updateDateFilters(e,o){let i=new Map();i.set(N.DateFrom,e),i.set(N.DateTo,o),this.updateFilters.emit(i);}updateSelectedFilters(){let e=this.filters().fileTypes,o=this.filters().originatorIds;this.selectedFilters={date:this.filters().dateFrom||this.filters().dateTo?1:0,types:e?.length??0,originators:o?.length??0};}updateFileTypeFilters(e){let o=new Map(),i=e?.filter(n=>n.checked).map(n=>n.id);o.set(N.FileTypes,i),this.updateFilters.emit(o);}updateOriginatorFilters(e){let o=new Map(),i=e?.filter(n=>n.checked).map(n=>n.label);o.set(N.OriginatorIds,i),this.updateFilters.emit(o);}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["acorn-filter-toolbar","fdp-reporting-files-toolbar",""]],inputs:{dateFilterForm:[1,"dateFilterForm"],fileTypesForm:[1,"fileTypesForm"],originatorsForm:[1,"originatorsForm"],filters:[1,"filters"],types:[1,"types"],originators:[1,"originators"]},outputs:{resetCurrentTablePage:"resetCurrentTablePage",updateFilters:"updateFilters"},features:[he],attrs:Ma,decls:5,vars:7,consts:()=>{let e;e="Datum";let o;o="Filtyp";let i;return i="Skapad av (id)",[["show-apply","",3,"filterClear","filterApply","numSelectedFilters"],["name","date","label",e,3,"selected"],[3,"dateFrom","dateTo","formGroup"],["name","fileType","label",o,3,"selected"],["name","originatorId","label",i,3,"selected"],[3,"formGroup"]];},template:function(o,i){o&1&&(s(0,"acorn-filter-toolbar-filters",0),m("filterClear",function(d){return i.filterClear(d);})("filterApply",function(d){return i.filterApply(d);}),s(1,"acorn-filter-toolbar-filters-item",1),I(2,"fdp-date-filter-chip",2),_(),L(3,Da,2,2,"acorn-filter-toolbar-filters-item",3),L(4,ha,2,2,"acorn-filter-toolbar-filters-item",4),_()),o&2&&(a("numSelectedFilters",i.selectedFilters.date+i.selectedFilters.types+i.selectedFilters.originators),l(),a("selected",i.selectedFilters.date),l(),a("dateFrom",i.filters().dateFrom)("dateTo",i.filters().dateTo)("formGroup",i.dateFilterForm()),l(),F(i.types().length?3:-1),l(),F(i.originators().length?4:-1));},dependencies:[Qo,ol,nl],encapsulation:2,changeDetection:0});}}return t;})();});function Ga(t,r){if(t&1&&_e(0,"acorn-list-body-item",3),t&2){let e=r.$implicit,o=p();be("label",e.name)("tagLabel",e.downloaded?o.MultipleFileDownloadMessages.Downloaded:"")("options",Qe(8,sl,Zi(5,ya,o.MultipleFileDownloadMessages.Download,e)))("messages",e.error?Qe(12,sl,Qe(10,ba,o.MultipleFileDownloadMessages.Error)):qi(14,Ba)
1)("disabled",o.isClerk());}}var ya,sl,ba,Ba,_l,dl=E(()=>{A();jt();ie();ut();$();y();Oe();A();ya=(t,r)=>({icon:"download",label:t,value:r}),sl=t=>[t],ba=t=>({text:t}),Ba=()=>[];_l=(()=>{class t{constructor(){this.MultipleFileDownloadMessages=Zn,this.data=T(At),this.store=T(X),this.fileAdminTrackingService=T(q),this.isClerk=this.store.selectSignal(mt),this.dialogRef=T(Et);}closeDialog(){this.dialogRef.close();}onSelectOption(e){if(e.preventDefault(),!this.isClerk()){let o=e.detail.value;this.store.dispatch(or({payload:{fileUids:o.files.map(i=>i.id)}})),this.fileAdminTrackingService.trackZipReportsDownload(e.detail.value.name);}}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-multiple-file-download-dialog"]],decls:9,vars:0,consts:()=>{let e;e="Ladda ner";let o;o="Avbryt";let i;return i="Klar",[["heading",e,1,"acorn-default-block-margins",3,"close"],["slot","content"],["layout","one-line","trailing","icon-button",3,"selectOption"],["tag-type","success",3,"label","tagLabel","options","messages","disabled"],["type","cancel","label",o,3,"click"],["priority","primary","label",i,3,"click"]];},template:function(o,i){o&1&&(K(0,"acorn-modal-section",0),zt("close",function(){return i.closeDialog();}),K(1,"div",1)(2,"acorn-list")(3,"acorn-list-body",2),zt("selectOption",function(d){return i.onSelectOption(d);}),ge(4,Ga,1,15,"acorn-list-body-item",3,Xi),se()(),K(6,"acorn-button-container")(7,"acorn-button",4),zt("click",function(){return i.closeDialog();}),se(),K(8,"acorn-button",5),zt("click",function(){return i.closeDialog();}),se()()()()),o&2&&(l(4),me(i.data()));},encapsulation:2,changeDetection:0});}}return t;})();});function $a(t,r){if(t&1){let e=D();s(0,"acorn-list")(1,"acorn-list-body",4),I(2,"acorn-list-body-item",5)(3,"acorn-list-body-item",6)(4,"acorn-list-body-item",7)(5,"acorn-list-body-item",8)(6,"acorn-list-body-item",9),_()(),s(7,"div",10)(8,"acorn-action-button",11),m("click",function(){f(e);let i=p();return S(i.download());}),_()();}if(t&2){let e=p();l(2),a("value",e.data.date),l(),a("value",e.data.fileName),l(),a("value",e.data.fileType),l(),a("value",e.data.originatorName),l(),a("value",e.data.originatorId),l(2),a("disabled",e.isClerk()||e.isDownloadingInProgress());}}var pl,cl=E(()=>{A();jt();ie();Fo();Tt();ut();$();y();Oe();_t();A();pl=(()=>{class t{constructor(){this.data=T(At),this.store=T(X),this.fileAdminTrackingService=T(q),this.isDownloadingInProgress=this.store.selectSignal(Yr),this.isClerk=this.store.selectSignal(mt),this.reportingFileDialogErrorPlacement=Mo,this.dialogRef=T(Et);}closeDialog(){this.dialogRef.close();}download(){this.store.dispatch(Le({placement:je}));let e=this.data.uid||"";this.store.dispatch(Go({payload:{uid:e}})),this.fileAdminTrackingService.trackSubItem(h.DownloadButton);}ngOnDestroy(){this.store.dispatch(Le({placement:je}));}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-reporting-file-dialog"]],decls:6,vars:2,consts:()=>{let e;e="Rapportdetaljer";let o;o="St\xE4ng";let i;i="Datum";let n;n="Filnamn";let d;d="Filtyp";let O;O="Skapad av";let x;x="Skapad av (id)";let k;return k="Ladda ner rapport",[["heading",e,1,"acorn-default-block-margins",3,"close"],["slot","content"],[3,"placement"],["type","cancel","label",o,3,"click"],["layout","one-line"],["label",i,3,"value"],["label",n,3,"value"],["label",d,3,"value"],["label",O,3,"value"],["label",x,3,"value"],[1,"reporting-file-dialog__download-button-container"],["label",k,"icon","arrow-down-to-lines",3,"click","disabled"]];},template:function(o,i){o&1&&(s(0,"acorn-modal-section",0),m("close",function(){return i.closeDialog();}),s(1,"div",1),I(2,"fdp-general-error",2),L(3,$a,9,6),s(4,"acorn-button-container")(5,"acorn-button",3),m("click",function(){return i.closeDialog();}),_()()()()),o&2&&(l(2),a("placement",i.reportingFileDialogErrorPlacement),l(),F(i.data?3:-1));},dependencies:[Xe],styles:[".reporting-file-dialog__download-button-container[_ngcontent-%COMP%]{display:flex;justify-content:right}"],changeDetection:0});}}return t;})();});function va(t,r){if(t&1&&I(0,"div",1),t&2){let e=p();a("fdpTips",e.reportingTabTipDetails());}}function Ua(t,r){if(t&1&&I(0,"acorn-applied-filters-item",4),t&2){let e=r.$implicit;a("value",e.value)("label",e.label);}}function xa(t,r){if(t&1){let e=D();s(0,"acorn-data-table-column",18),m("cellEvent",function(i){f(e);let n=p(2);return S(n.onRowSelectChange(i));})("checkAll",function(i){f(e);let n=p(2);return S(n.onRowSelectAllChange(i));}),_();}if(t&2){let e=p(2);a("columnKey",e.columnNames.Selected);}}function ka(t,r){if(t&1&&Yi(0,xa,1,1,"acorn-data-table-column",17),t&2){let e=p();a("fdpIsFeatureFlagOn",e.multipleDownloadsFF);}}function Ya(t,r){if(t&1){let e=D();s(0,"acorn-data-table-pagination",19),m("pageChanged",function(i){f(e);let n=p();return S(n.onPageChange(i));}),_();}if(t&2){let e=p();a("currentPage",e.currentPage())("rowsPerPage",e.rowsPerPage())("totalRowCount",e.totalLogs())("pageCount",e.totalPages());}}
1var wa,Il,Tl=E(()=>{A();re();jt();oe();Mn();Ft();ai();Hl();ut();Vt();$();pt();No();y();Oe();_t();at();Pe();al();dl();cl();A();xl();zl();wa=["reportsTable"];Il=(()=>{class t{get fileTypeControls(){return this.fileTypesForm().get(N.FileTypes);}get originatorIdControls(){return this.originatorsForm().get(N.OriginatorIds);}constructor(){this.store=T(X),this.formBuilder=T(ke),this.fileAdminTrackingService=T(q),this.reportingFiles=c(Mt),this.totalPages=c(),this.totalLogs=c(),this.rowsPerPage=c(),this.isBusy=c(),this.applyFilters=B(),this.reportsToDisplay=z(()=>this.isBusy()?Mt:this.reportingFiles().map(e=>u(g({},e),{selected:this.selectedFiles().has(e.uid)}))),this.isSortable=z(()=>!!this.totalPages()&&this.reportingFiles().length>1),this.userLanguage=this.store.selectSignal(gt),this.locale=z(()=>this.userLanguage()===Ge.SV?Ct:$e),this.fileTypes=this.store.selectSignal(Dr),this.entitledOriginators=this.store.selectSignal(Mr),this.multipleFilesDownloadBatches=this.store.selectSignal(Xr),this.filters=v({dateFrom:void 0,dateTo:void 0,fileTypes:void 0,originatorIds:void 0,sortDirection:void 0,sortProperty:void 0,page:1}),this.previousFilters={dateFrom:void 0,dateTo:void 0,fileTypes:void 0,originatorIds:void 0,sortDirection:void 0,sortProperty:void 0,page:1},this.currentPage=v(0),this.selectedFiles=v(new Set()),this.areReportsLoadedOnce=v(!1),this.reportingTabTipDetails=v(void 0),this.appliedFilters=v([]),this.startDate=Q(Fe(Date.now(),pe),{representation:"date"}),this.endDate=Q(Date.now(),{representation:"date"}),this.dateFilterForm=this.formBuilder.group({dateFrom:["",[ct({startDate:this.startDate,endDate:this.endDate})]],dateTo:["",[ct({startDate:this.startDate,endDate:this.endDate})]]},{validators:[Ao.dateRange(M.DateFrom,M.DateTo)]}),this.fileTypesForm=z(()=>this.formBuilder.group({fileTypes:this.formBuilder.array(this.getFileTypesForForm())})),this.originatorsForm=z(()=>this.formBuilder.group({originatorIds:this.formBuilder.array(this.getOriginatorIdsForForm())})),this.columnNames=lt,this.messageEmpty=Yn,this.multipleDownloadsFF=$n,this.dialog=T(Lo),this.reportsTableRef=Qi.required("reportsTable"),De(()=>{this.hasFiltersChanged()&&(this.previousFilters=this.filters(),this.applyFilters.emit(this.filters()),this.updateAppliedFilters());});}ngOnChanges(e){this.setupTips(e);}updateFilters(e){let o=g({},this.filters());e.has(N.DateFrom)&&(o.dateFrom=e.get(N.DateFrom)),e.has(N.DateTo)&&(o.dateTo=e.get(N.DateTo)),e.has(N.FileTypes)&&(o.fileTypes=e.get(N.FileTypes)),e.has(N.OriginatorIds)&&(o.originatorIds=e.get(N.OriginatorIds)),o.page=1,this.filters.set(o),this.clearFileSelection();}rowClick(e){this.dialog.open(pl,{data:e.detail.rowData,width:Xn}),this.fileAdminTrackingService.trackSubItem(h.DownloadDialog);}onPageChange(e){this.currentPage.set(e.detail.pageIndex),this.filters.update(o=>u(g({},o),{page:e.detail.pageIndex+1})),this.clearFileSelection();}onSort(e){let o=this.mapSortPropertyFromTableColumnName(e.detail.columnKey),i=this.mapSortDirectionFromTableSortDirection(e.detail.sortDirection);this.direction=e.detail.sortDirection,this.filters.update(n=>u(g({},n),{sortProperty:o,sortDirection:i})),this.clearFileSelection();}onRowSelectChange(e){let o=e.detail.rowData.uid,i=e.detail.value;this.selectedFiles.update(n=>{let d=new Set(n);return i?d.add(o):d.delete(o),d;});}onRowSelectAllChange(e){if(e.detail.value){let i=this.reportsToDisplay().map(n=>n.uid);this.selectedFiles.set(new Set(i));}else this.clearFileSelection();}onClear(){this.clearFileSelection();}onDownloadButtonClick(){let e=this.reportingFiles().filter(o=>this.selectedFiles().has(o.uid)).map(o=>({id:o.uid,sizeMb:o.fileSizeMb}));this.store.dispatch(Vo(e)),this.dialog.open(_l,{data:this.multipleFilesDownloadBatches,width:zn}),this.fileAdminTrackingService.trackMultipleReportsDownloadDialog(e.length);}resetCurrentTablePage(){this.currentPage.set(-1),this.clearFileSelection();}onClearFilterApplied(e){let o=this.filters().fileTypes,i=this.filters().originatorIds,n=new Map();e.detail.values.forEach(d=>{d===Ie.Date?(n.set(N.DateFrom,void 0),n.set(N.DateTo,void 0)):this.isValueFileType(d)?o=o?.filter(O=>O!==d):i=i?.filter(O=>O!==d);});for(let d=0;d<this.fileTypeControls.controls.length;d++){let O=this.fileTypeControls.controls[d].get(J.Id)?.value;this.fileTypeControls.controls[d].get(J.IsSelected)?.setValue(!!o?.includes(O));}for(let d=0;
1d<this.originatorIdControls.controls.length;d++){let O=this.originatorIdControls.controls[d].get(J.Label)?.value;this.originatorIdControls.controls[d].get(J.IsSelected)?.setValue(!!i?.includes(O));}n.set(N.FileTypes,o?.length?o:void 0),n.set(N.OriginatorIds,i?.length?i:void 0),this.updateFilters(n),this.resetCurrentTablePage();}updateAppliedFilters(){let e=[],o=this.filters().fileTypes,i=this.filters().originatorIds;(this.filters().dateFrom||this.filters().dateTo)&&e.push({label:this.createDateLabel(this.filters().dateFrom,this.filters().dateTo),value:Ie.Date}),o?.forEach(n=>{e.push({label:yt(n),value:n});}),i?.forEach(n=>{e.push({label:n,value:n});}),this.appliedFilters.set(e);}getFileTypesForForm(){return this.fileTypes().map(e=>this.formBuilder.group({id:[e],label:[yt(e)],isSelected:[!1]}));}getOriginatorIdsForForm(){return this.entitledOriginators().map(e=>this.formBuilder.group({label:[e],isSelected:[!1]}));}createDateLabel(e,o){let i=e?this.formatDate(e):"",n=o?this.formatDate(o):"";return`${i}${i&&n?" - ":""}${n}`;}formatDate(e){let o=dt(new Date(e),mo.DayShortMonthYear,{locale:this.locale()});return this.locale().code===Ge.SV?o.replace(".",""):o;}isValueFileType(e){return Object.values(pi).includes(e);}clearFileSelection(){this.selectedFiles.set(new Set());}hasFiltersChanged(){let e=this.previousFilters,o=this.filters();return e.dateFrom!==o.dateFrom||e.dateTo!==o.dateTo||e.fileTypes!==o.fileTypes||e.fileTypes!==o.fileTypes||e.sortProperty!==o.sortProperty||e.originatorIds!==o.originatorIds||e.sortDirection!==o.sortDirection||e.page!==o.page;}mapSortPropertyFromTableColumnName(e){switch(e){case lt.FileName:return Rt.FileName;case lt.Type:return Rt.FileType;case lt.OriginatorId:return Rt.OriginatorId;case lt.Date:return Rt.CreateDate;default:throw Error(`Unsupported sort property: ${e}`);}}mapSortDirectionFromTableSortDirection(e){switch(e){case di.Asc:return nt.Asc;case di.Desc:return nt.Desc;default:throw Error(`Unsupported sort direction: ${e}`);}}setupTips(e){if("isBusy"in e&&!e.isBusy.currentValue&&e.isBusy.previousValue&&!this.areReportsLoadedOnce()){let o=this.reportsTableRef().nativeElement.getBoundingClientRect();this.reportingTabTipDetails.set({tipName:Sn.AppFileAdminReportingTab,heading:"Tips",text:"Du kan ladda ner flera filer samtidigt. V\xE4lj de filer du vill ha och klicka p\xE5 \"Ladda ner\".",overlayDirection:Nn.Up,position:{top:o.top+Jn,left:o.left+er},delay:200}),this.areReportsLoadedOnce.set(!0);}}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-reporting-table"]],viewQuery:function(o,i){o&1&&Vi(i.reportsTableRef,wa,5),o&2&&ji();},inputs:{reportingFiles:[1,"reportingFiles"],totalPages:[1,"totalPages"],totalLogs:[1,"totalLogs"],rowsPerPage:[1,"rowsPerPage"],isBusy:[1,"isBusy"]},outputs:{applyFilters:"applyFilters"},features:[he],decls:18,vars:21,consts:()=>{let e;e="Datum";let o;o="Filnamn";let i;i="Filtyp";let n;n="Skapad av";let d;d="Skapad av (id)";let O;O="rapporter";let x;return x="Ladda ner",[["reportsTable",""],[3,"fdpTips"],["fdp-reporting-files-toolbar","",3,"updateFilters","resetCurrentTablePage","filters","types","originators","dateFilterForm","fileTypesForm","originatorsForm"],[3,"clearFilter"],[3,"value","label"],["row-header-column","none",3,"sort","messageEmpty"],["column-type","row-select",3,"columnKey"],["heading",e,"fixed-width","130",3,"columnKey","sortable"],["heading",o,"fixed-width","380",3,"columnKey","sortable"],["heading",i,"fixed-width","100",3,"columnKey","sortable"],["heading",n,3,"columnKey"],["heading",d,"fixed-width","150",3,"columnKey","sortable"],["column-key","rowClick","column-type","row-link",3,"cellEvent"],[3,"rowData"],[3,"currentPage","rowsPerPage","totalRowCount","pageCount"],["clearable","","unit",O,3,"clear","itemCount"],["type","submit","label",x,3,"click"],["column-type","row-select",3,"columnKey","cellEvent","checkAll",4,"fdpIsFeatureFlagOn"],["column-type","row-select",3,"cellEvent","checkAll","columnKey"],[3,"pageChanged","currentPage","rowsPerPage","totalRowCount","pageCount"]];},template:function(o,i){o&1&&(L(0,va,1,1,"div",1),s(1,"acorn-filter-toolbar",2),m("updateFilters",function(d){return i.updateFilters(d);})("resetCurrentTablePage",function(){return i.resetCurrentTablePage();}),_(),s(2,"acorn-applied-filters",3),m("clearFilter",function(d){return i.onClearFilterApplied(d);}),ge(3,Ua,1,2,"acorn-applied-filters-item",4,ye),_(),s(5,"acorn-data-table",5,0),m("sort",function(d){return i.onSort(d);}),L(7,ka,1,1,"acorn-data-table-column",6),I(8,"acorn-data-table-column",7)(9,"acorn-data-table-column",8)(10,"acorn-data-table-column",9)(11,"acorn-data-table-column",10)(12,"acorn-data-table-column",11),s(13,"acorn-data-table-column",12),m("cellEvent",function(d){return i.rowClick(d);}
1),_(),I(14,"acorn-data-table-row-group",13),L(15,Ya,1,4,"acorn-data-table-pagination",14),s(16,"acorn-data-table-selection-bar",15),m("clear",function(){return i.onClear();}),s(17,"acorn-button",16),m("click",function(){return i.onDownloadButtonClick();}),_()()()),o&2&&(F(i.reportingTabTipDetails()&&i.totalPages()?0:-1),l(),a("filters",i.filters())("types",i.fileTypes())("originators",i.entitledOriginators())("dateFilterForm",i.dateFilterForm)("fileTypesForm",i.fileTypesForm())("originatorsForm",i.originatorsForm()),l(2),me(i.appliedFilters()),l(2),a("messageEmpty",i.messageEmpty),l(2),F(i.totalPages()?7:-1),l(),a("columnKey",i.columnNames.Date)("sortable",i.isSortable()?"custom":null),l(),a("columnKey",i.columnNames.FileName)("sortable",i.isSortable()?"custom":null),l(),a("columnKey",i.columnNames.Type)("sortable",i.isSortable()?"custom":null),l(),a("columnKey",i.columnNames.Originator),l(),a("columnKey",i.columnNames.OriginatorId)("sortable",i.isSortable()?"custom":null),l(2),a("rowData",i.reportsToDisplay()),l(),F(i.totalPages()?15:-1),l(),a("itemCount",i.selectedFiles().size));},dependencies:[le,Tn,In,Rn,Cn,ll],encapsulation:2,changeDetection:0});}}return t;})();});function za(t,r){t&1&&I(0,"acorn-section-header",1);}function Ha(t,r){t&1&&I(0,"acorn-section-header",2);}function Va(t,r){if(t&1){let e=D();s(0,"fdp-reporting-table",6),m("applyFilters",function(i){f(e);let n=p();return S(n.fetchWithParameters(i));}),_();}if(t&2){let e=p();a("reportingFiles",e.reportingFiles())("isBusy",e.isReportingFilesBusy())("totalPages",e.totalPages())("totalLogs",e.totalLogs())("rowsPerPage",e.rowsPerPage);}}function ja(t,r){t&1&&(s(0,"acorn-message",5)(1,"acorn-message-body"),G(2,0),_()());}var Xa,gl,ml=E(()=>{A();ie();Fo();Tt();$();y();_t();Tl();A();Xa=["fdp-reporting-files",""];gl=(()=>{class t{constructor(){this.store=T(X),this.hasDownloadEntitlement=c(),this.reportingFiles=this.store.selectSignal(vr),this.isReportingFilesBusy=this.store.selectSignal(Ur),this.totalPages=this.store.selectSignal(xr),this.totalLogs=this.store.selectSignal(kr),this.rowsPerPage=Ne,this.reportingFilesErrorPlacement=je;}ngOnInit(){this.hasDownloadEntitlement()&&this.store.dispatch(oo({payload:{page:1,pageSize:Ne}}));}fetchWithParameters(e){this.store.dispatch(oo({payload:{page:e.page,pageSize:Ne,createDateFrom:e.dateFrom,createDateTo:e.dateTo,fileTypes:e.fileTypes,originatorIds:e.originatorIds,sortDirection:e.sortDirection,sortProperty:e.sortProperty}}));}ngOnDestroy(){this.store.dispatch(Le({placement:je}));}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["acorn-section","fdp-reporting-files",""]],inputs:{hasDownloadEntitlement:[1,"hasDownloadEntitlement"]},attrs:Xa,decls:6,vars:3,consts:()=>{let e;e="Rapportering";let o;return o="Du kan inte se eller ladda ner rapporteringsfiler. Kontakta ansvarig administrat\xF6r p\xE5 ditt f\xF6retag f\xF6r beh\xF6righet.",[o,["heading",e],["heading","Empty heading","hide","true"],[3,"placement"],[3,"reportingFiles","isBusy","totalPages","totalLogs","rowsPerPage"],["severity","info"],[3,"applyFilters","reportingFiles","isBusy","totalPages","totalLogs","rowsPerPage"]];},template:function(o,i){o&1&&(L(0,za,1,0,"acorn-section-header",1)(1,Ha,1,0,"acorn-section-header",2),s(2,"acorn-section-body"),I(3,"fdp-general-error",3),L(4,Va,1,5,"fdp-reporting-table",4)(5,ja,3,0,"acorn-message",5),_()),o&2&&(F(i.hasDownloadEntitlement()?0:1),l(3),a("placement",i.reportingFilesErrorPlacement),l(),F(i.hasDownloadEntitlement()?4:5));},dependencies:[Il,Xe],encapsulation:2,changeDetection:0});}}return t;})();});function Wa(t,r){if(t&1&&I(0,"fdp-feedback-targeted",0),t&2){let e=p();a("feedbackQuestion",e.questions.Reporting)("flowTag",e.flowTags.Reporting)("label",e.feedbackRatingLabel)("categoryId",e.feedbackCategoryId);}}var Ka,ul,El=E(()=>{A();Co();So();y();ml();A();_i();Ka=["fdp-reporting-files-page",""];ul=(()=>{class t{constructor(){this.isClerk=c.required(),this.hasDownloadEntitlement=c.required(),this.flowTags=Ce,this.questions=We,this.feedbackRatingLabel=He.CSAT,this.feedbackCategoryId=Ve.PaymentsAndTransfersFileTransfer;}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["acorn-custom-page-body","fdp-reporting-files-page",""]],inputs:{isClerk:[1,"isClerk"],hasDownloadEntitlement:[1,"hasDownloadEntitlement"]},attrs:Ka,decls:2,vars:2,consts:[["slot","section",1,"fdp-print--hide",3,"feedbackQuestion","flowTag","label","categoryId"],["fdp-reporting-files","",3,"hasDownloadEntitlement"]],template:function(o,i){o&1&&(L(0,Wa,1,4,"fdp-feedback-targeted",0),I(1,"acorn-section",1)),o&2&&(F(i.hasDownloadEntitlement()&&!i.isClerk()?0:-1),l(),a("hasDownloadEntitlement",i.hasDownloadEntitlement()));},dependencies:[Nt,St,gl],encapsulation:2,changeDetection:0});}}return t;})();});function qa(t,r){if(t&1){let e=D();s(0,"acorn-list")(1,"acorn-list-body",13),m("selectOption",function(){f(e);let i=p(2);return S(i.cleanUpFile());}),I(2,"acorn-list-body-item",14),_()();}if(t&2){let e=p(2);l(2),a("label",e.file.name)("options",e.menuOptions);}}function Za(t,r){if(t&1&&(s(0,"acorn-message",15)(1,"acorn-message-body"),co(2),_()()),t&2){let e=p(3);a("heading",e.errorTitle()),l(2),Io(e.error());}}function Qa(t,r){if(t&1){let e=D();s(0,"acorn-radio-group",19),m("change",function(i){f(e);let n=p(3);return S(n.onUploadTypeChange(i));}),I(1,"acorn-radio",20)(2,"acorn-radio",21),_();}if(t&2){let e=p(3);l(),a("checked",e.uploadType()===e.productParts.Base)("value",e.productParts.Base),l(),a("checked",e.uploadType()===e.productParts.Emergency)("value",e.productParts.Emergency);}}function Ja(t,r){t&1&&(s(0,"acorn-section"),I(1,"acorn-section-header",22),s(2,"acorn-section-body")(3,"p"),G(4,2),_()()());}function es(t,r){t&1&&(s(0,"acorn-section"),I(1,"acorn-section-header",23),s(2,"acorn-section-body")(3,"p"),G(4,3),_()()());}function ts(t,r){if(t&1){let e=D();L(0,Za,3,2,"acorn-message",15),L(1,Qa,3,4,"acorn-radio-group",16),s(2,"input",17,0
1),m("cancel",function(){f(e);let i=p(2);return S(i.disableFileSelectButton(!1));})("change",function(i){f(e);let n=p(2);return S(n.onFileSelect(i));}),_(),s(4,"acorn-action-button",18),m("click",function(){f(e);let i=Ki(3);return p(2).disableFileSelectButton(!0),S(i.click());}),_(),s(5,"p"),G(6,1),_(),L(7,Ja,5,0,"acorn-section")(8,es,5,0,"acorn-section");}if(t&2){let e=p(2);F(e.error()?0:-1),l(),F(e.data.hasStandard&&e.data.hasBackupRoutine?1:-1),l(),a("accept",e.allowedExtension()),l(2),a("disabled",e.isFileSelectDisabled()),l(2),Yt(e.allowedExtension()),Xt(6),l(),F(e.uploadType()===e.productParts.Base?7:8);}}function os(t,r){if(t&1){let e=D();L(0,qa,3,2,"acorn-list")(1,ts,9,6),s(2,"acorn-button-container",10)(3,"acorn-button",11),m("click",function(){f(e);let i=p();return S(i.closeDialog());}),_(),s(4,"acorn-button",12),m("click",function(){f(e);let i=p();return S(i.uploadFile());}),_()();}if(t&2){let e=p();F(e.file&&!e.error()?0:1);}}function is(t,r){t&1&&(s(0,"acorn-conclusion",24)(1,"acorn-conclusion-body"),G(2,4),_()());}function ns(t,r){t&1&&(s(0,"acorn-conclusion",25)(1,"acorn-conclusion-body"),zi(2,5),I(3,"br"),Hi(),_()());}function rs(t,r){if(t&1){let e=D();L(0,is,3,0,"acorn-conclusion",24)(1,ns,4,0,"acorn-conclusion",25),s(2,"acorn-button-container",10)(3,"acorn-button",26),m("click",function(){f(e);let i=p();return S(i.closeDialog());}),_()();}if(t&2){let e=p();F(e.uploadType()===e.productParts.Base?0:1);}}var Al,Ll=E(()=>{A();jt();ie();oe();Fo();Tt();Vt();$();y();Oe();Pe();A();Al=(()=>{class t{constructor(){this.data=T(At),this.store=T(X),this.dialogRef=T(Et),this.fileAdminTrackingService=T(q),this.fileAdminApiService=T(rr),this.file=void 0,this.uploadResponse=v(void 0),this.error=v(void 0),this.errorTitle=v(void 0),this.isFileSelectDisabled=v(!1),this.uploadType=v(W.Base),this.allowedExtension=v(Ze.Xml),this.isUploadInProgress=z(()=>this.uploadResponse()?.status()==="uploading"),this.isUploadFlowUnfinished=z(()=>this.uploadResponse()?.status()!=="complete"),this.uploadProgressMessage=z(()=>{let o=this.uploadResponse()?.progress().percentage||0;return`${jn} ${o}%`;}),this.serverError=z(()=>this.uploadResponse()?.error()?.error),this.serverErrorItem=z(()=>{let e=this.serverError();if(e?.errorMessages)return this.buildServerErrorItem(e.errorMessages,e.status);}),this.menuOptions=[{label:"Remove",value:"delete",icon:"delete"}],this.fileUploadDialogErrorPlacement=Ke.FileUploadDialog,this.productParts=W,De(()=>{!this.isUploadInProgress()&&this.file&&this.cleanUpFile();}),De(()=>{this.isUploadFlowUnfinished()||this.fileAdminTrackingService.trackFileUpload(this.uploadType(),!0);}),De(()=>{let e=this.serverErrorItem();e&&this.handleServerError(e);}),!this.data.hasStandard&&this.data.hasBackupRoutine&&(this.uploadType.set(W.Emergency),this.allowedExtension.set(Ze.Zip));}onFileSelect(e){let o=this.getFile(e);this.validateFile(o),this.error()||(this.file=o),this.isFileSelectDisabled.set(!1);}uploadFile(){if(this.validateFile(this.file),this.file){let e=this.fileAdminApiService.uploadFile({file:this.file,uploadType:this.uploadType()});this.uploadResponse.set(e),this.fileAdminTrackingService.trackFileUpload(this.uploadType());}}closeDialog(){this.cleanUpFile(),this.isUploadInProgress()&&this.uploadResponse()&&this.uploadResponse()?.abort(),this.dialogRef.close();}cleanUpFile(){this.file=void 0;}disableFileSelectButton(e){this.isFileSelectDisabled.set(e);}onUploadTypeChange(e){this.store.dispatch(Le({placement:this.fileUploadDialogErrorPlacement})),this.resetErrors();let o=e.target.value;this.uploadType.set(W.Emergency===o?W.Emergency:W.Base),this.allowedExtension.set(W.Emergency===o?Ze.Zip:Ze.Xml);}getFile(e){return e.target.files?.[0];}validateFile(e){this.store.dispatch(Le({placement:this.fileUploadDialogErrorPlacement})),this.resetErrors(),e?Qn.test(e.name)?this.setError(Ot.FileNameHasSpecialCharacters,Wt.FileNameHasSpecialCharacters):this.uploadType()===W.Base?cr(e.name)&&!e.name.toLowerCase().endsWith(Ze.Xml)?this.setError(Ot.NotXML,Wt.InvalidExtension):e.size>hn&&this.setError(Ot.ExceedsMaxSize,Wt.ExceedsMaxSize):this.uploadType()===W.Emergency&&(e.type!==yn&&e.type!==bn||
1!e.name.toLowerCase().endsWith(Ze.Zip))&&this.setError(Ot.NotZIP,Wt.InvalidExtension):this.setError(Ot.NoFile,void 0);}setError(e,o){o&&this.errorTitle.set(o),this.error.set(e),this.fileAdminTrackingService.trackFlowError(e,ee.UploadFile);}resetErrors(){this.error.set(void 0),this.errorTitle.set(void 0);}handleServerError(e){this.fileAdminTrackingService.trackFlowError(e.errorMessages,ee.UploadFile),this.store.dispatch(it({title:e.title,error:e.userErrorMessage,placement:Ke.FileUploadDialog}));}buildServerErrorItem(e,o){let i=o===Ht.BadRequest&&e.general&&e.general.length>=1?e.general[0].message:Gn;return{title:this.getErrorTitle(e.general?.[0]?.code),userErrorMessage:i,errorMessages:e};}getErrorTitle(e){switch(e){case qe.InvalidOriginator:return"Aktivt id f\xF6r fullmaktshavare saknas";case qe.InvalidXml:return"Fel filstruktur";case qe.FileNameTooLong:return"Filnamnet \xE4r f\xF6r l\xE5ngt";case qe.CreationDateInFuture:return"Filens tidsangivelse \xE4r i framtiden";case qe.CreationDateTooOld:return"Filens tidsangivelse \xE4r f\xF6r gammal";case qe.FileNameHasSpecialCharacters:return"Filnamnet f\xE5r inte inneh\xE5lla specialtecken";default:return;}}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-file-upload-dialog"]],decls:6,vars:4,consts:()=>{let e;e="Ladda upp fil";let o;o="Avbryt";let i;i="Ladda upp";let n;n="V\xE4lj filuppladdning";let d;d="V\xE4lj fil";let O;O="Filformat som st\xF6ds: "+"\uFFFD0\uFFFD"+"";let x;x="Standard";let k;k="Reservrutin";let b;b="Ladda upp betalfiler";let ae;ae="Ladda upp dina betalningar via fil enligt standarden ISO20022 i xml-format.";let Z;Z="Reservrutin f\xF6r direktintegration (zip)";let $t;$t="Du beh\xF6ver komprimera dina signerade och krypterade filer till en zip-fil f\xF6r att kunna ladda upp dem manuellt. \xC5terredovisning och statusrapporter skickas som vanligt med direktintegration till er SFTP.";let wt;wt="Klart!";let vt;vt="Din fil \xE4r uppladdad och bearbetas";let Ut;Ut="OK";let xt;xt="Din fil \xE4r uppladdad och bearbetas. Pr\xF6va att uppdatera sidan om du inte kan se status och filinformation.";let kt;return kt="F\xF6r status, filinformation och motsvarande rapportering kontakta supporten f\xF6r elektroniska betalningar p\xE5 [email protected] eller"+"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"+"08-58592930.",[["fileInput",""],O,ae,$t,xt,kt,["heading",e,1,"acorn-default-block-margins",3,"close"],["slot","content"],[3,"placement"],[3,"message","busy"],[1,"file-upload-dialog--button-container"],["type","cancel","label",o,3,"click"],["type","submit","priority","executive","label",i,3,"click"],["layout","one-line","trailing","icon-button",3,"selectOption"],["item-id","0",3,"label","options"],["severity","error",3,"heading"],["label",n,1,"file-upload-dialog--radio-container"],["type","file","multiple","false",1,"file-upload-dialog--input",3,"cancel","change","accept"],["icon","circle-plus","label",d,3,"click","disabled"],["label",n,1,"file-upload-dialog--radio-container",3,"change"],["label",x,3,"checked","value"],["label",k,3,"checked","value"],["heading",b],["heading",Z],["type","success","heading",wt],["type","success","heading",vt],["priority","executive","label",Ut,3,"click"]];},template:function(o,i){o&1&&(s(0,"acorn-modal-section",6),m("close",function(){return i.closeDialog();}),s(1,"div",7),I(2,"fdp-general-error",8),s(3,"acorn-loader-container",9),L(4,os,5,1)(5,rs,4,1),_()()()),o&2&&(l(2),a("placement",i.fileUploadDialogErrorPlacement),l(),a("message",i.uploadProgressMessage())("busy",i.isUploadInProgress()),l(),F(i.isUploadFlowUnfinished()?4:5));},dependencies:[Xe],styles:[".file-upload-dialog--input[_ngcontent-%COMP%]{display:none}.file-upload-dialog--radio-container[_ngcontent-%COMP%]{margin-top:0}.file-upload-dialog--button-container[_ngcontent-%COMP%]{margin-bottom:0}"],changeDetection:0});}}return t;})();});function ls(t,r){if(t&1){let e=D();s(0,"acorn-button-container")(1,"acorn-button",2),m("click",function(){f(e);let i=p();return S(i.showAllFiles.emit());}),_()();}}var Fl,fl=E(()=>{A();ie();oe();$();y();Pi();Jo();A();Fl=(()=>{class t{constructor(){this.markedLog=c(),this.selectFileLog=B(),this.showAllFiles=B(),this.store=T(X),this.latestFileLogs=this.store.selectSignal(br),this.isLatestFileLogsFetchBusy=this.store.selectSignal(Br),this.messageEmpty=Po;}ngOnInit(){this.store.dispatch(Re({payload:{statuses:[w.InProgress,w.Accepted]}}));}static{this.ɵfac=function(o){return new(o||t)();};}
1static{this.ɵcmp=C({type:t,selectors:[["fdp-latest-file-logs"]],inputs:{markedLog:[1,"markedLog"]},outputs:{selectFileLog:"selectFileLog",showAllFiles:"showAllFiles"},decls:3,vars:5,consts:()=>{let e;e="Visa alla uppladdade filer";let o;return o="Visa alla uppladdade filer (\xF6ppnas i en ny flik)",[[3,"busy"],[3,"tableRowClick","fileLogs","messageEmpty","markedLog"],["type","button","priority","guiding","label",e,"accessibility-label",o,3,"click"]];},template:function(o,i){o&1&&(s(0,"acorn-loader-container",0)(1,"fdp-file-logs-table",1),m("tableRowClick",function(d){return i.selectFileLog.emit(d);}),_(),L(2,ls,2,0,"acorn-button-container"),_()),o&2&&(a("busy",i.isLatestFileLogsFetchBusy()),l(),a("fileLogs",i.latestFileLogs())("messageEmpty",i.messageEmpty)("markedLog",i.markedLog()),l(),F(i.latestFileLogs().length?2:-1));},dependencies:[Gt],encapsulation:2,changeDetection:0});}}return t;})();});function as(t,r){if(t&1){let e=D();s(0,"acorn-button-container")(1,"acorn-button",2),m("click",function(){f(e);let i=p();return S(i.showMore.emit());}),_()();}}var Sl,Nl=E(()=>{A();ie();oe();$();y();Mi();Jo();A();Sl=(()=>{class t{constructor(){this.markedLog=c(),this.selectFileLog=B(),this.showMore=B(),this.store=T(X),this.latestRejectedFileLogs=this.store.selectSignal($r),this.isLatestRejectedFileLogsFetchBusy=this.store.selectSignal(wr),this.messageEmpty=kn;}ngOnInit(){this.store.dispatch(Re({payload:{statuses:[w.Rejected]}}));}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-latest-rejected-file-logs"]],inputs:{markedLog:[1,"markedLog"]},outputs:{selectFileLog:"selectFileLog",showMore:"showMore"},decls:3,vars:5,consts:()=>{let e;e="Visa fler";let o;return o="Visa fler (\xF6ppnas i en ny flik)",[[3,"busy"],[3,"tableRowClick","fileLogs","messageEmpty","markedLog"],["type","button","priority","guiding","label",e,"accessibility-label",o,3,"click"]];},template:function(o,i){o&1&&(s(0,"acorn-loader-container",0)(1,"fdp-file-logs-table",1),m("tableRowClick",function(d){return i.selectFileLog.emit(d);}),_(),L(2,as,2,0,"acorn-button-container"),_()),o&2&&(a("busy",i.isLatestRejectedFileLogsFetchBusy()),l(),a("fileLogs",i.latestRejectedFileLogs())("messageEmpty",i.messageEmpty)("markedLog",i.markedLog()),l(),F(i.latestRejectedFileLogs().length?2:-1));},dependencies:[Gt],encapsulation:2,changeDetection:0});}}return t;})();});function _s(t,r){if(t&1&&I(0,"fdp-feedback-targeted",1),t&2){let e=p(2);a("feedbackQuestion",e.questions.FileUpload)("flowTag",e.flowTags.FileUpload)("label",e.feedbackRatingLabel)("categoryId",e.feedbackCategoryId);}}function ds(t,r){if(t&1){let e=D();s(0,"acorn-section"),I(1,"acorn-section-header",4),s(2,"acorn-section-body")(3,"fdp-latest-rejected-file-logs",5),m("selectFileLog",function(i){f(e);let n=p(2);return S(n.fileLogOutput.emit(i));})("showMore",function(){f(e);let i=p(2);return S(i.showMore.emit());}),_()()(),s(4,"acorn-section"),I(5,"acorn-section-header",6),s(6,"acorn-section-body")(7,"fdp-latest-file-logs",7),m("selectFileLog",function(i){f(e);let n=p(2);return S(n.fileLogOutput.emit(i));})("showAllFiles",function(){f(e);let i=p(2);return S(i.showAllFiles.emit());}),_()()();}if(t&2){let e=p(2);l(3),a("markedLog",e.selectedFileLogId()),l(4),a("markedLog",e.selectedFileLogId());}}function ps(t,r){if(t&1){let e=D();L(0,_s,1,4,"fdp-feedback-targeted",1),s(1,"acorn-section"),I(2,"acorn-section-header",2),s(3,"acorn-section-body")(4,"acorn-action-button",3),m("click",function(){f(e);let i=p();return S(i.openUploadDialog());}),_()()(),L(5,ds,8,2);}if(t&2){let e=p();F(e.isClerk()?-1:0),l(4),a("disabled",e.isClerk()),l(),F(e.hasBaseProduct()&&e.hasUploadEntitlement()?5:-1);}}function cs(t,r){t&1&&(s(0,"acorn-section"),I(1,"acorn-section-header",8),s(2,"acorn-section-body")(3,"acorn-message",9)(4,"acorn-message-body"),G(5,0),_()()()());}var ss,ti,$i=E(()=>{A();jt();Co();So();y();Oe();Ll();fl();Nl();A();_i();ss=["fdp-upload-file-page",""];ti=(()=>{class t{constructor(){this.dialog=T(Lo),this.fileAdminTrackingService=T(q),this.canUpload=c.required(),this.isClerk=c.required(),this.hasBaseProduct=c.required(),this.hasUploadEntitlement=c.required(),this.hasBackupRoutineProduct=c.required(),this.hasBackupRoutineEntitlement=c.required(),this.selectedFileLogId=c(),this.fileLogOutput=B(),this.showMore=B(),this.showAllFiles=B(),this.flowTags=Ce,this.questions=We,this.feedbackRatingLabel=He.CSAT,this.feedbackCategoryId=Ve.PaymentsAndTransfersFileTransfer;}openUploadDialog(){let e={hasStandard:this.hasBaseProduct()&&this.hasUploadEntitlement(),hasBackupRoutine:this.hasBackupRoutineProduct()&&this.hasBackupRoutineEntitlement()};this.fileAdminTrackingService.trackSubItem(h.UploadDialog),this.dialog.open(Al,{data:e,width:qn});}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["acorn-custom-page-body","fdp-upload-file-page",""]],inputs:{canUpload:[1,"canUpload"],isClerk:[1,"isClerk"],hasBaseProduct:[1,"hasBaseProduct"],hasUploadEntitlement:[1,"hasUploadEntitlement"],hasBackupRoutineProduct:[1,"hasBackupRoutineProduct"],hasBackupRoutineEntitlement:[1,"hasBackupRoutineEntitlement"],selectedFileLogId:[1,"selectedFileLogId"]},outputs:{fileLogOutput:"fileLogOutput",showMore:"showMore",showAllFiles:"showAllFiles"},attrs:ss,decls:2,vars:1,consts:()=>{let e;e="Ladda upp filer";let o;o="Ladda upp ny fil";let i;i="Avvisade filer";let n;n="Filer";let d;return d="Du kan inte ladda upp filer. Kontakta ansvarig administrat\xF6r p\xE5 ditt f\xF6retag f\xF6r beh\xF6righet.",[d,["slot","section",1,"fdp-print--hide",3,"feedbackQuestion","flowTag","label","categoryId"],["heading",e],["icon","circle-plus","label",o,3,"click","disabled"],["heading",i],[3,"selectFileLog","showMore","markedLog"],["heading",n],[3,"selectFileLog","showAllFiles","markedLog"],["heading","Empty heading","hide","true"],["severity","info"]];}
1,template:function(o,i){o&1&&L(0,ps,6,3)(1,cs,6,0,"acorn-section"),o&2&&F(i.canUpload()?0:1);},dependencies:[Nt,St,Fl,Sl],encapsulation:2,changeDetection:0});}}return t;})();});function Is(t,r){if(t&1&&I(0,"acorn-custom-page-subnav-option",15)(1,"acorn-custom-page-subnav-option",16),t&2){let e=p(2);a("value",e.FileAdministrationTab.AllFiles)("active",e.currentTab()===e.FileAdministrationTab.AllFiles),l(),a("value",e.FileAdministrationTab.Reporting)("active",e.currentTab()===e.FileAdministrationTab.Reporting);}}function Ts(t,r){t&1&&(s(0,"acorn-message",17)(1,"acorn-message-body"),G(2,0),_()());}function gs(t,r){t&1&&(s(0,"acorn-message",17)(1,"acorn-message-body"),G(2,1),_()());}function ms(t,r){if(t&1&&L(0,gs,3,0,"acorn-message",17),t&2){let e=p(3);F(e.currentTab()===e.FileAdministrationTab.UploadFile||e.currentTab()===e.FileAdministrationTab.AllFiles?0:-1);}}function us(t,r){if(t&1&&L(0,Ts,3,0,"acorn-message",17)(1,ms,1,1),t&2){let e=p(2);F(e.isClerk()?1:0);}}function Es(t,r){if(t&1){let e=D();s(0,"acorn-custom-page-body",18),m("fileLogOutput",function(i){f(e);let n=p(2);return S(n.selectFileLog(i));})("showMore",function(){f(e);let i=p(2);return S(i.showMore());})("showAllFiles",function(){f(e);let i=p(2);return S(i.showAllFiles());}),_();}if(t&2){let e=p(2);a("canUpload",e.canUpload())("isClerk",e.isClerk())("hasBaseProduct",e.hasBaseProduct())("hasUploadEntitlement",e.hasUploadEntitlement())("hasBackupRoutineProduct",e.hasBackupRoutineProduct())("hasBackupRoutineEntitlement",e.hasBackupRoutineEntitlement())("selectedFileLogId",e.selectedFileLogId());}}function As(t,r){if(t&1){let e=D();s(0,"acorn-custom-page-body",19),m("fileLogOutput",function(i){f(e);let n=p(2);return S(n.selectFileLog(i));}),_();}if(t&2){let e=p(2);a("isClerk",e.isClerk())("hasUploadEntitlement",e.hasUploadEntitlement())("forcedFilter",e.forcedFilter())("selectedFileLogId",e.selectedFileLogId());}}function Ls(t,r){if(t&1&&I(0,"acorn-custom-page-body",14),t&2){let e=p(2);a("isClerk",e.isClerk())("hasDownloadEntitlement",e.hasDownloadEntitlement());}}function Fs(t,r){if(t&1){let e=D();s(0,"acorn-custom-page-subnav",10),m("select",function(i){f(e);let n=p();return S(n.onSubNavSelect(i));}),I(1,"acorn-custom-page-subnav-option",11),L(2,Is,2,4),_(),L(3,us,2,1),L(4,Es,1,7,"acorn-custom-page-body",12)(5,As,1,4,"acorn-custom-page-body",13)(6,Ls,1,2,"acorn-custom-page-body",14);}if(t&2){let e,o=p();l(),a("value",o.FileAdministrationTab.UploadFile)("active",o.currentTab()===o.FileAdministrationTab.UploadFile),l(),F(o.hasBaseProduct()?2:-1),l(),F(o.hasUploadEntitlement()?3:-1),l(),F((e=o.currentTab())===o.FileAdministrationTab.UploadFile?4:e===o.FileAdministrationTab.AllFiles?5:e===o.FileAdministrationTab.Reporting?6:-1);}}function fs(t,r){if(t&1&&(s(0,"span"),G(1,2),_(),I(2,"acorn-link",22)),t&2){let e=p(2);l(2),a("href",e.isoProductsAndOfferingsUrl);}}function Ss(t,r){if(t&1&&(s(0,"span"),G(1,3),_(),I(2,"acorn-link",23)),t&2){let e=p(2);l(2),a("href",e.isoProductsAndOfferingsUrl);}}function Ns(t,r){if(t&1){let e=D();s(0,"acorn-section",21),I(1,"acorn-section-header",24),s(2,"acorn-section-body")(3,"acorn-link",25),m("click",function(){f(e);let i=p(2);return S(i.navigateToProduct());}),_()()();}}function Cs(t,r){if(t&1&&(s(0,"acorn-section",21),I(1,"acorn-section-header",26),s(2,"acorn-section-body")(3,"span"),G(4,4),_(),I(5,"acorn-link",27),_()()),t&2){let e=p(2);l(5),a("href",e.noProductBranchOfficeUrlCib);}}function Rs(t,r){if(t&1&&(s(0,"acorn-custom-page-body")(1,"acorn-section"),I(2,"acorn-section-header",20),s(3,"acorn-section-body"),L(4,fs,3,1)(5,Ss,3,1),_()(),L(6,Ns,4,0,"acorn-section",21)(7,Cs,6,1,"acorn-section",21),_()),t&2){let e=p();l(4),F(e.isClerk()?4:5),l(2),F(e.isClerk()?6:7);}}function Os(t,r){if(t&1&&I(0,"fdp-file-log-details",9),t&2){let e=p();a("fileLog",e.selectedFileLog());}}var Cl,wi=E(()=>{A();$l();wl();ie();oe();Co();So();Fo();Tt();Mn();vl();ft();Ul();ut();$();so();y();Oe();_t();Vr();Gi();El();$i();A();Cl=(()=>{class t{constructor(){this.router=T(on),this.route=T(tn),this.store=T(X),this.fileAdminTrackingService=T(q),this.isEntitlementsLoading=this.store.selectSignal(fr),this.hasBaseProduct=this.store.selectSignal(Nr),this.hasBackupRoutineProduct=this.store.selectSignal(Cr),this.hasUploadEntitlement=this.store.selectSignal(Rr),this.hasDownloadEntitlement=this.store.selectSignal(Or),this.hasBackupRoutineEntitlement=this.store.selectSignal(Pr),this.isClerk=this.store.selectSignal(mt),this.canUpload=z(()=>this.hasBaseProduct()&&this.hasUploadEntitlement()||this.hasBackupRoutineProduct()&&this.hasBackupRoutineEntitlement()),this.currentTab=Ji(this.router.events.pipe(Ui(e=>e instanceof en),ne(()=>{let e=this.route.firstChild?.routeConfig?.path;return this.getTabFromPath(e);})),{initialValue:j.UploadFile}),this.forcedFilter=v(void 0),this.selectedFileLog=v(void 0),this.selectedFileLogId=v(void 0),this.fileAdminCorpErrorPlacement=Ke.FileAdminCorp,this.FileAdministrationTab=j,this.tagsToIgnore=Pn,this.flowTags=Ce,this.questions=We,this.feedbackRatingLabel=He.CSAT,this.feedbackCategoryId=Ve.PaymentsAndTransfersFileTransfer,this.isoProductsAndOfferingsUrl=Kn,this.noProductBranchOfficeUrlCib=Wn;}
1ngOnInit(){this.store.dispatch($o()),this.fileAdminTrackingService.trackTabClicks(this.currentTab());}onSubNavSelect(e){let o=e.detail.value;o===j.UploadFile&&this.forcedFilter.set(void 0),this.navigateToTab(o),this.fileAdminTrackingService.trackTabClicks(o);}onClosePageDetail(){this.selectedFileLog.set(void 0),this.selectedFileLogId.set(void 0);}onClickOutside(){this.onClosePageDetail();}selectFileLog(e){this.selectedFileLog.set(e),this.selectedFileLogId.set(e.uid);}showMore(){this.forcedFilter.set([w.Rejected]),this.navigateToTab(j.AllFiles);}showAllFiles(){this.navigateToTab(j.AllFiles);}navigateToProduct(){this.store.dispatch(dn({path:["./../../foretagets-tjanster/anslutning-foretag"]}));}ngOnDestroy(){this.store.dispatch(Le({placement:this.fileAdminCorpErrorPlacement})),this.fileAdminTrackingService.endFileAdminFlow(this.currentTab());}navigateToTab(e){this.fileAdminTrackingService.trackTabClicks(e),this.router.navigate([this.getTabRoute(e)]);}getTabRoute(e){switch(e){case j.AllFiles:return`${ho}/${de.AllFiles}`;case j.Reporting:return`${ho}/${de.Reporting}`;default:return ho;}}getTabFromPath(e){return e?wn[e]||j.UploadFile:j.UploadFile;}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵcmp=C({type:t,selectors:[["fdp-file-administration-corp"]],decls:7,vars:5,consts:()=>{let e;e="Filadministration";let o;o="Fildetaljer";let i;i="Ladda upp filer";let n;n="Alla uppladdade filer";let d;d="Rapportering";let O;O="Du godk\xE4nner betalningarna i din fil under Betalningsordrar.";let x;x="Som r\xE5dgivare kan du inte ladda upp filer.";let k;k="Om Filadministration";let b;b="H\xE4r kan du l\xE4sa mer om bankens ISO 20022-erbjudande";let ae;ae="Filadministration \xE4r en del av produkten Anslutning F\xF6retag och bankens ISO 20022-erbjudande. Med tj\xE4nsten Filadministration kan kunder som anv\xE4nder Utbetalning F\xF6retag ladda upp och h\xE4mta betal- och rapporteringsfiler i internetbanken.";let Z;Z="L\xE4s mer om bankens ISO 20022-erbjudande";let $t;$t="Filadministration \xE4r en del av produkten Anslutning F\xF6retag och bankens ISO 20022-erbjudande. Med tj\xE4nsten Filadministration kan ni som anv\xE4nder Utbetalning F\xF6retag ladda upp och h\xE4mta betal- och rapporteringsfiler i internetbanken.";let wt;wt="Best\xE4ll Filadministration";let vt;vt="Anslutning F\xF6retag";let Ut;Ut="Best\xE4ll Filadministration";let xt;xt="Kontakta Kundcenter eller ert bankkontor";let kt;kt="Hitta ditt bankkontor";let H;return H="Kundcenter F\xF6retag: 0771-33 44 33",[O,x,ae,$t,H,[1,"acorn-default-block-margins",3,"busy"],["heading",e],[3,"placement"],["heading",o,"fdpClickOutside","",3,"close","clickOutside","tagsToIgnore"],[3,"fileLog"],[3,"select"],["label",i,3,"value","active"],["fdp-upload-file-page","",3,"canUpload","isClerk","hasBaseProduct","hasUploadEntitlement","hasBackupRoutineProduct","hasBackupRoutineEntitlement","selectedFileLogId"],["fdp-all-files-page","",3,"isClerk","hasUploadEntitlement","forcedFilter","selectedFileLogId"],["fdp-reporting-files-page","",3,"isClerk","hasDownloadEntitlement"],["label",n,3,"value","active"],["label",d,3,"value","active"],["severity","info"],["fdp-upload-file-page","",3,"fileLogOutput","showMore","showAllFiles","canUpload","isClerk","hasBaseProduct","hasUploadEntitlement","hasBackupRoutineProduct","hasBackupRoutineEntitlement","selectedFileLogId"],["fdp-all-files-page","",3,"fileLogOutput","isClerk","hasUploadEntitlement","forcedFilter","selectedFileLogId"],["heading",k],["theme","sky"],["type","external","target","_blank","label",b,3,"href"],["type","external","target","_blank","label",Z,3,"href"],["heading",wt],["label",vt,3,"click"],["heading",Ut,"sub-heading",xt],["type","external","target","_blank","label",kt,3,"href"]];},template:function(o,i){o&1&&(s(0,"acorn-custom-page",5),I(1,"acorn-custom-page-header",6)(2,"fdp-general-error",7),L(3,Fs,7,5)(4,Rs,8,2,"acorn-custom-page-body"),_(),s(5,"acorn-page-detail",8),m("close",function(){return i.onClosePageDetail();})("clickOutside",function(){return i.onClickOutside();}),L(6,Os,1,1,"fdp-file-log-details",9),_()),o&2&&(a("busy",i.isEntitlementsLoading()),l(2),a("placement",i.fileAdminCorpErrorPlacement),l(),F(i.hasBaseProduct()||i.hasBackupRoutineProduct()?3:4),l(2),a("tagsToIgnore",i.tagsToIgnore),l(
1),F(i.selectedFileLog()?6:-1));},dependencies:[fe,Xe,gn,Hr,ti,ei,ul,Ln,_n],encapsulation:2,changeDetection:0});}}return t;})();});var Rl,Ol=E(()=>{A();ai();so();y();Rl=()=>T(cn).fetchFeatureFlags([Oo]).pipe(xi(1),ne(()=>!0));});var Pl,Ml=E(()=>{A();ie();Tt();ri();so();y();Oe();A();Pl=(()=>{class t{constructor(){this.actions$=T(To),this.fileAdminTrackingService=T(q),this.handleCheckEntitlementFail$=Ee(()=>this.actions$.pipe(Ae(lo),ne(e=>(this.fileAdminTrackingService.trackFlowError(e.error.errorMessages,ee.UploadFile),it({error:e.error,placement:Ke.FileAdminCorp})))));}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵprov=Me({token:t,factory:t.ɵfac});}}return t;})();});var vi,Dl,hl,yl=E(()=>{$();vi=function(t){return t.SetHasProduct="[FileAdministrationEntitlement] Set Has Product",t.SetHasDownloadEntitlement="[FileAdministrationEntitlement] Set Has Download Entitlement",t;}(vi||{}),Dl=P(vi.SetHasProduct,(t,r)=>({hasProduct:t,hasUploadEntitlement:r})),hl=P(vi.SetHasDownloadEntitlement,t=>({hasDownloadEntitlement:t}));});var bl,Bl=E(()=>{A();jl();ie();oe();Tt();Vl();Vt();ri();$();so();y();Oe();Pe();yl();at();hi();A();bl=(()=>{class t{constructor(){this.store=T(X),this.actions$=T(To),this.fileDownloadService=T(On),this.fileAdminTrackingService=T(q),this.distributeFetchFileLogs$=Ee(()=>this.actions$.pipe(Ae(Re),ne(e=>e.payload.page?Uo():e.payload.statuses?.includes(w.Rejected)&&!e.payload.page?vo():wo()))),this.distributeFetchFileLogsSuccess$=Ee(()=>this.actions$.pipe(Ae(Ei),ne(e=>{let o=e.payload.content||[];return e.callerPayload.page?Yo(o,e.payload.totalPages||0,e.payload.totalElements||0):e.callerPayload.statuses?.includes(w.Rejected)&&!e.callerPayload.page?ko(o):xo(o);}))),this.distributeFetchFileLogsFail$=Ee(()=>this.actions$.pipe(Ae(Ai),ne(e=>{if(this.fileAdminTrackingService.trackFlowError(e.error.errorMessages,e.callerPayload.page?ee.AllFiles:ee.UploadFile),e.error.status===Ht.Unauthorized){let o=e.error.title!==vn,i=e.error.title!==Un;return Dl(o,i);}else return e.callerPayload.page?Ho():e.callerPayload.statuses?.includes(w.Rejected)&&!e.callerPayload.page?zo():Xo();}))),this.handleReportingFilesFail$=Ee(()=>this.actions$.pipe(Ae(io,Dn),ne(e=>(this.fileAdminTrackingService.trackFlowError(e.error.errorMessages,ee.Reporting),e.error.status===Ht.Unauthorized&&e.error.title===xn?hl(!1):it({error:e.error.errorMessages?.general?.[0].message,placement:je}))))),this.handleDownloadReportingFileSuccess$=Ee(()=>this.actions$.pipe(Ae(no),oi(e=>{if(e.payload.fileContent&&e.payload.fileName&&e.payload.contentType){let o=e.payload.fileContent;this.fileDownloadService.downloadBase64ContentFile(o,e.payload.contentType,e.payload.fileName);}})),{dispatch:!1}),this.handleDownloadReportingFileFail$=Ee(()=>this.actions$.pipe(Ae(ro),ne(e=>(this.fileAdminTrackingService.trackFlowError(e.error.errorMessages,ee.Reporting),it({error:e.error.errorMessages?.general?.[0].message,placement:Mo}))))),this.handleDownloadReportingFilesZipSuccess$=Ee(()=>this.actions$.pipe(Ae(to),ki(this.store.select(Di)),oi(([e,o])=>{let i=bt(e.callerPayload.fileUids),n=o[i];this.fileDownloadService.downloadFile(e.payload,n.filename);})),{dispatch:!1});}static{this.ɵfac=function(o){return new(o||t)();};}static{this.ɵprov=Me({token:t,factory:t.ɵfac});}}return t;})();});var Tm,Gl=E(()=>{ri();$();y();wi();Gi();$i();Ol();_t();Ml();Bl();Tm=[{path:de.UploadFile,canActivate:[Rl],component:Cl,providers:[ln(Ro,gr),an([bl,Pl])],children:[{path:de.AllFiles,component:ei,pathMatch:"full"},{path:de.Reporting,component:ti,pathMatch:"full"}]}];});var Ps=E(()=>{Gl();wi();});Ps();export{Cl as FileAdministrationCorpComponent,Tm as routes};/**i18n:15f074eea0cb327b37975ffd523531729ab0457ff69c56a45bbc17662cbc1391*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.