import{T as d,U as V}from"./chunk-INYFUTXB.js";import{O as u,Sd as M,l,na as z,oa as T,r as n,ta as p,x as m,ya as S}from"./chunk-XJKQ67XR.js";import{e as f}from"./chunk-SZAW6ZBW.js";var r,h=f(()=>{r=class{constructor(){this.isValid=!0,this.fileSizeTooBig=!1,this.fileNameTooLong=!1}}});var y,b=f(()=>{z();h();T();M();V();y=(()=>{class i{constructor(t){this.dataSourceSettingsService=t}validateFile(t,a,s,o){if(t instanceof Blob){let e=new r;return this.dataSourceSettingsService.get().pipe(m(c=>{let g=!!o;o??=c.maxFileSizeByte;let v=g?o/1024/1024:c.maxFileSizeMByte;return t.size>o&&(e.isValid=!1,e.fileSizeTooBig=!0,e.maxFileSize=v),s&&a.length>s&&(e.isValid=!1,e.fileNameTooLong=!0,e.maxFileNameLength=s),e}),u(c=>n(e)))}return l}static{this.\u0275fac=function(a){return new(a||i)(S(d))}}static{this.\u0275prov=p({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})()});export{y as a,b};
