import{L as d,M as V}from"./chunk-FYLDFXYJ.js";import{Gd as M,O as u,l,ma as z,na as T,r as n,sa as p,x as m,xa as S}from"./chunk-JSJB5BKT.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};
